@@ -57,33 +57,33 @@ function $IntervalProvider() {
57
57
* // Don't start a new fight if we are already fighting
58
58
* if ( angular.isDefined(stop) ) return;
59
59
*
60
- * stop = $interval(function() {
61
- * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
62
- * $scope.blood_1 = $scope.blood_1 - 3;
63
- * $scope.blood_2 = $scope.blood_2 - 4;
64
- * } else {
65
- * $scope.stopFight();
60
+ * stop = $interval(function() {
61
+ * if ($scope.blood_1 > 0 && $scope.blood_2 > 0) {
62
+ * $scope.blood_1 = $scope.blood_1 - 3;
63
+ * $scope.blood_2 = $scope.blood_2 - 4;
64
+ * } else {
65
+ * $scope.stopFight();
66
+ * }
67
+ * }, 100);
68
+ * };
69
+ *
70
+ * $scope.stopFight = function() {
71
+ * if (angular.isDefined(stop)) {
72
+ * $interval.cancel(stop);
73
+ * stop = undefined;
66
74
* }
67
- * }, 100);
68
- * };
69
- *
70
- * $scope.stopFight = function() {
71
- * if (angular.isDefined(stop)) {
72
- * $interval.cancel(stop);
73
- * stop = undefined;
74
- * }
75
- * };
76
- *
77
- * $scope.resetFight = function() {
78
- * $scope.blood_1 = 100;
79
- * $scope.blood_2 = 120;
80
- * };
81
- *
82
- * $scope.$on('$destroy', function() {
83
- * // Make sure that the interval is destroyed too
84
- * $scope.stopFight();
85
- * });
86
- * }])
75
+ * };
76
+ *
77
+ * $scope.resetFight = function() {
78
+ * $scope.blood_1 = 100;
79
+ * $scope.blood_2 = 120;
80
+ * };
81
+ *
82
+ * $scope.$on('$destroy', function() {
83
+ * // Make sure that the interval is destroyed too
84
+ * $scope.stopFight();
85
+ * });
86
+ * }])
87
87
* // Register the 'myCurrentTime' directive factory method.
88
88
* // We inject $interval and dateFilter service since the factory method is DI.
89
89
* .directive('myCurrentTime', ['$interval', 'dateFilter',
0 commit comments