ionic2 - double or triple tap

My app needs a gesture recognize when a double tap or a triple tap has occurred. In the source code I can see ionic2 is using hammer.js. I have tried to implement the a double tap, but it is not working. Haas anyone been able to and if so could you please share the code to get it working?

Cheers

Pseudo code:
counter = 0
lastTapTime = 0
tap event => if nowTime - lastTapTime < 150ms, then ++counter, else counter = 0
if counter === 2, then double tap
if counter === 3, then triple tap

1 Like

You should check the tutorials section my friend, I have a tutorial there that does exactly what you need. Using Gestures Hold, Double Tap, and more in the Ionic 2 Beta

Come across this answer a bit late as now but still want to give you a thumb up :smiley: Thank you.