button onclick method angular code example Example: onclick event in angular (click)="myClickFunction($event)"