condition on click event in angular 11 example Example: if condition for click in angular (click)="idx > 0 && removeSelected(item.spId)"