0
<div (click)="parentAction()"> 
    <div (click)="childAction()"></div>
</div>

I want to trigger childAction only here but both parentAction and childAction is getting executed. How can I stop parentAction in this?

rinukkusu
  • 21,351
  • 4
  • 61
  • 68
Prajeet Shrestha
  • 7,623
  • 3
  • 31
  • 57

1 Answers1

3
<div (click)="parentAction()"> 
    <div (click)="$event.stopPropagation();childAction()"></div>
</div>
Günter Zöchbauer
  • 558,509
  • 191
  • 1,911
  • 1,506