在我的应用程序中,我希望具有基于条件的点击事件,
<div class="trashIconDiv" (click)="if(idx > 0) {removeSelected(item.spId)}">
In the above code removeSelected function should be executed only when idx >0 , any idea how to implement
在我的应用程序中,我希望具有基于条件的点击事件,
<div class="trashIconDiv" (click)="if(idx > 0) {removeSelected(item.spId)}">
In the above code removeSelected function should be executed only when idx >0 , any idea how to implement
(click)="idx > 0 && removeSelected(item.spId)"