How can I prevent from clicking child’s function
<img src=abc (click)=“clickedC()”/>
when I click img. it call both clickedP and clickedC…
How can I only click child? not calling parent function?
How can I prevent from clicking child’s function
<img src=abc (click)=“clickedC()”/>
when I click img. it call both clickedP and clickedC…
How can I only click child? not calling parent function?
set same function for both but pass $event param for child function and check event.target inside function
like
.ts
functionName(event?)
{
if(event)
{
console.log(event)
//check event property and find clicked tag name
}
}