Stopping Angular Click Events from Propagating

Image by Erik Stein from Pixabay


<a (click)="onCardClick()">

When any area of the app-custom-start-card is clicked the onCardClick() event listener will fire.

We have a button inside the card:

<button (click)="issuesTab()">Issues</button>

Clicking this button also triggers onCardClick() . We want to prevent this.


<button (click)="issuesTab($event)">

And stop the propagation:

issuesTab(e:Event) {
e.stopPropagation(), '_blank');

Founder of Firefly Semantics Corporation