onclick event in angular code example
Example 1: onclick event in angular
(click)="myClickFunction($event)"
Example 2: angular click event
<button (click)="FunctionName()">TEST</button>
Example 3: onclick function in angular
import { Component } from "@angular/core";
@Component({
templateUrl:"home.html"
})
export class HomePage {
public items: Array<string>;
constructor() {
this.items = ["item1", "item2", "item3"]
}
public open(event, item) {
alert('Open ' + item);
}
}