Increment variable faster while pressing button

Any ideas how to do it ? (Ionic 2)

I’ve tried using this article but no success…

How are you incrementing the variable right now before pressing the button?

I have a ion-button using the (click)=“increment();”, where increment() is a function that simples does the this.variable++; Therefore, when someone clicks the button, it increments the value by 1.

My goal is to when someone holds the button, its increase faster than clicking to increments 1 by 1.

Do you think its possible? Any ideas?

This (or something similar) might help:

Hey Sujan12, thank you for your time so far.

The press directive you recommended me worked well… but there is a little problem.

When I’m working on my browser(chrome) and the device toolbar is disabled the hold button works without problems(it increments a variable faster), but when I switch to the device toolbar enabled (to change the layout like a cellphone), it doesn’t work anymore: when I hold click on a button, it shows options of the browser like if I were pressing the right button on the page (check screenshot attached). I tried on android simulator and its not working too :frowning: Do you have any ideas how to solve that? maybe avoid this behavior…

Ps.: Tested on a real device and the problem is happening too…

This may as well be a feature of the lib, I have no experience with it unfortunately.