File tree 1 file changed +8
-8
lines changed 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -147,21 +147,21 @@ angular.module('timer', [])
147
147
return ;
148
148
}
149
149
calculateTimeUnits ( ) ;
150
- //We are not using $timeout for a reason. Please read here - https://github.com/siddii/angular-timer/pull/5
151
- $scope . timeoutId = setTimeout ( function ( ) {
152
- tick ( ) ;
153
- $scope . $digest ( ) ;
154
- } , $scope . interval - adjustment ) ;
155
-
156
- $scope . $emit ( 'timer-tick' , { timeoutId : $scope . timeoutId , millis : $scope . millis } ) ;
157
-
158
150
if ( $scope . countdown > 0 ) {
159
151
$scope . countdown -- ;
160
152
}
161
153
else if ( $scope . countdown <= 0 ) {
162
154
$scope . stop ( ) ;
163
155
return ;
164
156
}
157
+
158
+ //We are not using $timeout for a reason. Please read here - https://github.com/siddii/angular-timer/pull/5
159
+ $scope . timeoutId = setTimeout ( function ( ) {
160
+ tick ( ) ;
161
+ $scope . $digest ( ) ;
162
+ } , $scope . interval - adjustment ) ;
163
+
164
+ $scope . $emit ( 'timer-tick' , { timeoutId : $scope . timeoutId , millis : $scope . millis } ) ;
165
165
} ;
166
166
167
167
if ( $scope . autoStart === undefined || $scope . autoStart === true ) {
You can’t perform that action at this time.
0 commit comments