Button Link inside Ion-Item Link


#1

Guys, i have a problem.

I use the ion-item thumbnail with button on the end.

The ion-item i link to other page and this button too… The problem is, when i try to open this button inside the ion-item (that are linked), open both pages… How can i solve this? =(

I solve changing the link of ion-item to the label and thumbnail, but i think that’s dont a good and correct way haha.

Thanks.


#2

you could try this dirty fix:

buttonClicked:boolean = false;
onIonItemTap(parameter){
 setTimeout(()=>{
  if(!this.buttonClicked){
 // open page with parameters
   } else {
    this.buttonClicked = false;
   }
 },7);
}
onButtonTab(parameter){
 this.buttonClicked = true;
 setTimeout(()=>{ this.buttonClicked = false;},10);
 // open page with parameters
}