angular conditional click event code example
Example 1: conditional (click) action angular
<button [class]="index===0? 'btn white': 'btn'" (click)="link && goToStories()">
Example 2: if condition for click in angular
(click)="idx > 0 && removeSelected(item.spId)"