I am currently utilizing @Output
in the child component to invoke a specific method in the parent component. However, I am encountering an issue where clicking on
(click)="viewPromotionDetails('Learn more')"
in the child component is also triggering (click)="description()"
If anyone could assist me with resolving this dilemma, that would be greatly appreciated.
I have included a link to the code on StackBlitz for reference.
Thank you in advance for your help.
child.component.html
<div>
<div>Name </div>
<div>Description </div>
<div class="lear-more" (click)="viewPromotionDetails('Learn more')">Learn More</div>
</div>
Parent component HTML: app.component.html
<div class="description" (click)="description()">
<my-child (leanMore)="callLearnMore($event)"></my-child>
</div>