Hi all, sorry for my dumb question, right now im struggling with this multiple tap buttons. Below is my code so far:
in *ts file:
export class InOutPage {
public tap: number = 0;
public tap2: number = 0;
constructor(public navCtrl: NavController, public navParams: NavParams) {
}
tapEventInc(e) {
this.tap++
}
tapEventDec(e) {
this.tap–
}
tapsEventInc(e) {
this.tap2++
}
tapsEventDec(e) {
this.tap2–
}
ionViewDidLoad() {
console.log(‘ionViewDidLoad InOutPage’);
}
public event = {
month: ‘2017-01-01’,
timeStarts: ‘00:00’,
timeEnds: ‘2020-12-31’
}
}
and this is the html file:
Ruby
<button ion-button (tap)="tapEventInc($event)">
+
</button>
{{tap}}
<button ion-button (tap)="tapEventDec($event)">
-
</button>
</ion-item>
Thats the summary of my coding right now, tap2 function doest work. How can I manage two gesture buttons? Because my concern is the name of tap, press, swipe and pan cant be changed since they are fixed in the ionic library. Thanks a lot.