UNPKG

countup-angularjs-directive

Version:
2 lines 524 B
/*! countup-angularjs-directive by Andrew Boni on 20-09-2014 */ (function(){"use strict";angular.module("ngCountup",[]).directive("countUp",function(){return{restrict:"A",require:"ngModel",scope:{ngModel:"="},link:function(a,b,c){var d,e;return e=0,d=4,null!=c.numDecimals&&c.numDecimals>=0&&(e=c.numDecimals),null!=c.animationLength&&c.animationLength>0&&(d=c.animationLength),a.$parent.$watch(c.ngModel,function(a,b){return null==b&&(b=0),null==a&&(a=0),null!=a?new countUp(c.id,b,a,e,d).start():void 0})}}})}).call(this);