0.1.0 • Published 11 years ago
ng-while-holding v0.1.0
ng-while-holding
ng-while-holding is an AngularJS directive to evaluate an expression when an element is clicked and holded.
Usage
Add the ngWhileHolding module as a dependency to your AngularJS app:
var app = angular.module('myApp', ['ngWhileHolding']);Add the directive while-holding to an HTML element:
<button while-holding="doFancyThings()">
Click and hold me
</button>Use the whilde-holding-debounce attribute if you want to change the tick length. Default: 200ms
<button while-holding="doFancyThings()" while-holding-debounce="50">
I do it faster
</button>0.1.0
11 years ago