angular-timer
angular-timer copied to clipboard
Clear() to reset countdown!?
Hey! Thanks for your great Library! I do have this problem that I want to reset my countdown on maybe a ng-click! but Clear() just stops it not making the countdown 0! How can I do that!?
After I tried timer.reset and its didn`t work . I figure a solution : var timer = document.getElementById(ID OF THE TIMER); // reset the timer $scope.agents[i].startTime = Date.now(); timer.start();
hope it wil help someone.
@avihaym Thanks for the tipp, but what is "i" in $scope.agents[i] ? Can't get it to work like that ^^
It just an array i use for . Replace it to your timer startTime element