@@ -57,33 +57,33 @@ function $IntervalProvider() {
5757 * // Don't start a new fight if we are already fighting
5858 * if ( angular.isDefined(stop) ) return;
5959 *
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;
6674 * }
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+ * }])
8787 * // Register the 'myCurrentTime' directive factory method.
8888 * // We inject $interval and dateFilter service since the factory method is DI.
8989 * .directive('myCurrentTime', ['$interval', 'dateFilter',
0 commit comments