Button Hold event

Is there a way to catch button hold event and do an operation repeatedly for every second.
Currently I have an increment button and on click I increment the value by x. When the user holds down the increment button I would like to increment in multiples.

Sankaranarayanan MG

Check this out - http://roblouie.com/article/198/using-gestures-in-the-ionic-2-beta

1 Like

Any news on hold events in Ionic 2? :sleepy:

1 Like

Actually, using (press)="press()" for starting and (touchend)="touchend()" for stopping, will do the trick…


thank you .you made my day…

:slight_smile: i know that AHAH

thanks for your help

How can i search all events in ionic ?

I was searching all over the place for such feature to repeat fire a method when holding a button. Here what I found, hope it become useful for someone else looking for something similar.

<button (press)="holdCount()" (touchend)="endCount()" (tap)='remove()'>

    this.timeoutHandler = setInterval(() => {
    }, 100);

   if (this.timeoutHandler) {
    this.timeoutHandler = null;

Source: https://stackoverflow.com/questions/43071160/how-to-listen-for-a-click-and-hold-in-angular-2