angular-touch.js in your HTML:
<script src="angular.js"> <script src="angular-touch.js">
You can download this file from the following places:
bower install angular-touch@X.Y.Z
where X.Y.Z is the AngularJS version you are running.
Then load the module in your application by adding it as a dependent module:
With that you're ready to get started!
ngTouch module provides touch events and other helpers for touch-enabled devices.
The implementation is based on jQuery Mobile touch event handling
$swipe for usage.
DEPRECATION NOTICE: Beginning with Angular 1.5, this directive is deprecated and by default disabled. The directive will receive no further support and might be removed from future releases. If you need the directive, you can enable it with the $touchProvider#ngClickOverrideEnabled function. We also recommend that you migrate to FastClick. To learn more about the 300ms delay, this Telerik article gives a good overview.A more powerful replacement for the default ngClick designed to be used on touchscreen devices. Most mobile browsers wait about 300ms after a tap-and-release before sending the click event. This version handles them immediately, and then prevents the following click event from propagating.
Specify custom behavior when an element is swiped to the left on a touchscreen device. A leftward swipe is a quick, right-to-left slide of the finger. Though ngSwipeLeft is designed for touch-based devices, it will work with a mouse click and drag too.
Specify custom behavior when an element is swiped to the right on a touchscreen device. A rightward swipe is a quick, left-to-right slide of the finger. Though ngSwipeRight is designed for touch-based devices, it will work with a mouse click and drag too.