AngularJS directive that adds support for multi touch gestures to your app. Based on hammer.js.
- Include
gestures.js
orgestures.min.js
into your page - Declare
'angular-gestures'
as a dependency for your angular app:angular.module('myApp', ['angular-gestures']);
- Use attributes on you containers in the same way you use
ng-click
e.g.hm-tap="add_something()"
- You can use angular interpolations like this :
hm-swipe="remove_something({{ id }})"
- You can also use Hammer.js options by e.g.
hm-tap-opts="{hold: false}"
- hmDoubleTap : 'doubletap',
- hmDragStart : 'dragstart',
- hmDrag : 'drag',
- hmDragUp : 'dragup',
- hmDragDown : 'dragdown',
- hmDragLeft : 'dragleft',
- hmDragRight : 'dragright',
- hmDragEnd : 'dragend',
- hmHold : 'hold',
- hmPinch : 'pinch',
- hmPinchIn : 'pinchin',
- hmPinchOut : 'pinchout',
- hmRelease : 'release',
- hmRotate : 'rotate',
- hmSwipe : 'swipe',
- hmSwipeUp : 'swipeup',
- hmSwipeDown : 'swipedown',
- hmSwipeLeft : 'swipeleft',
- hmSwipeRight : 'swiperight',
- hmTap : 'tap',
- hmTouch : 'touch',
- hmTransformStart : 'transformstart',
- hmTransform : 'transform',
- hmTransforEnd : 'transformend'