- Forums
- Angular
- Angular 2 Onclick Example Using Code
this page contains a simple example of how to use angular 2 onclick [4639], Last Updated: Mon Jun 24, 2024
Angular2
Tue Jan 31, 2017
0 Comments
427 Visits
(click)="onSelect(hero)"
EXAMPLE HTML:
<li click)="RunFunction(String)">click me to start RunFunction()</li>
on the above code, if you click the li text, it will call the RunFunction();
very simple