0

How to implement tap, with angularjs.

This is my example

<div ng-click="test">Test</div>

I would want to have a tap in place of ng-click. There was one example in this link How to use hammer.js with Angular.js

I was able to bind a tap even in directive this way

$(element).hammer({prevent_default: false,drag_vertical: false}).bind("tap",function($event){});

But how to replace ng-click or use other events of hammer.js.

Community
  • 1
  • 1
Madhu
  • 121
  • 2
  • 9
  • Have you tried looking at angular-gestures? I've only used it for swipe events but seems to work well and is based on hammer.js: https://github.com/wzr1337/angular-gestures – Nat Wallbank Nov 21 '14 at 19:55
  • There also another library which is possibly more up-to-date: http://ryanmullins.github.io/angular-hammer/. I haven't tried this one yet but intend to take a closer look. – Nat Wallbank Nov 21 '14 at 20:00

0 Answers0