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