No longer maintained, would you be our new maintainer? Let us know at mark@ulties.com.
A angular module to add directives for touch devices.
Version: 1.0.2
Author: Mark Topper [Facebook] [Github] [Twitter]
Website: ulties.com
Email: mark@ulties.com
Install using bower:
bower install ngtouch --save
Install using npm:
npm install ngtouch --save
Go to NPM page for this package.
Load the file to you HTML header:
<script type="text/javascript" src="https://github.com/nglar/ngTouch/raw/master/path/to/components/ngtouch/build/ngTouch.min.js"></script>
You must include the ngTouch dependency on your angular module:
var app = angular.module("demoapp", ["ngTouch"]);
Then in your HTML you can use:
<div ng-touchmove="someFunction()" ng-touchstart="someFunction()" ng-touchend="someFunction()"></div>
Once a touch device start touching, this event will be called.
Here is a usage example:
yourController.js
$scope.onTouchstart = function() { console.log($scope.event); // the event object console.log('touchstart event called'); }
yourView.html
<div ng-touchstart="onTouchstart()"></div>
Once a touch device end touching, this event will be called.
Here is a usage example:
yourController.js
$scope.onTouchend = function() { console.log($scope.event); // the event object console.log('touchend event called'); }
yourView.html
<div ng-touchend="onTouchend()"></div>
Whenever a touch device is touched and moving.
Here is a usage example:
yourController.js
$scope.onTouchmove = function() { console.log($scope.event); // the event object console.log('touchmove event called'); }
yourView.html
<div ng-touchmove="onTouchmove()"></div>
Whenever a touch device is tapped without moved around.
Here is a usage example:
yourController.js
$scope.onTap = function() { console.log($scope.event); // the event object console.log('tap event called'); }
yourView.html
<div ng-tap="onTap()"></div>
The following is a list of libraries that extend ngTouch:
Contact me at mark@ulties.com to get yours added.
The following is a list of libraries that requires by ngTouch:
The following is a list of alternatives for ngTouch:
ngTouchmove:
A angular module to add directive ng-touchmove
.
ngTouchstart:
A angular module to add directive ng-touchstart
.
ngTouchend:
A angular module to add directive ng-touchend
.
ngTap:
A angular module to add directive ng-tap
.
From the project directory, tests can be ran using gulp test
Thank you for considering contributing! The contribution guide can be found in the contributions.md.
If you discover a security vulnerability within ngTouch, please send an e-mail to Mark Topper at mark@ulties.com. All security vulnerabilities will be promptly addressed.
Released under the MIT License - see license.txt
for details.