Issue
How to avoid triggering the div click event when clicking on ion-icon
<div(click)="goNext()">
<ion-icon name="close-circle-outline" size="large" (click)="dissmiss()"></ion-icon>
</div>
Solution
On the dissmiss function you have to write your icon code logic. after performing you have to place event.stopPropagation() at the end of dissmiss function to stop event to trigger the parent events.
like this:
function dissmiss(event){
// write code for icon close.
event.stopPropagation();
}
the above code runs the logic that you written for icon close and the stopped immediately at this function and will not go to the parent node click.
Answered By - SandyKrish
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.