angular-timer icon indicating copy to clipboard operation
angular-timer copied to clipboard

Clear() to reset countdown!?

Open mamsoudi opened this issue 8 years ago • 3 comments

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!?

mamsoudi avatar Oct 05 '16 09:10 mamsoudi

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 avatar Oct 30 '16 15:10 avihaym

@avihaym Thanks for the tipp, but what is "i" in $scope.agents[i] ? Can't get it to work like that ^^

g0rd0nbl3u avatar Dec 05 '16 16:12 g0rd0nbl3u

It just an array i use for . Replace it to your timer startTime element

avihaym avatar Dec 06 '16 12:12 avihaym