We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 527b47d commit 9229e0cCopy full SHA for 9229e0c
app/js/timer.js
@@ -29,20 +29,20 @@ angular.module('timer', [])
29
$scope.stop();
30
});
31
32
- function init() {
+ function reset() {
33
if ($scope.timeoutId) {
34
$timeout.cancel($scope.timeoutId);
35
}
36
37
38
$scope.start = $element[0].start = function () {
39
$scope.startTime = new Date();
40
- init();
+ reset();
41
tick();
42
};
43
44
$scope.resume = $element[0].resume = function () {
45
46
$scope.startTime = new Date() - ($scope.stoppedTime - $scope.startTime);
47
48
0 commit comments