Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 230980

Custom click events inside button ion-item

$
0
0

Hi.

I’m trying to add click events to elements of my button ion item for example:
HTML file

<button ion-item (click)="mainclick()">

<ion-label>
<div (click)="secondaryClick($event)">
</div>
</ion-label>

</button>

TS file

secondaryClick(event:Event){
event.stopPropagation();
console.log("clicked")
}

The problem is that always do the mainclick() the stoppropagation doesnt work properly.

Any way to do this?


Viewing all articles
Browse latest Browse all 230980

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>