blob: cffe4de23fb2766b5a63c1d04e78f7d7af0c021f (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
 | @ngdoc error
@name $rootScope:infdig
@fullName Infinite $digest Loop
@description
This error occurs when the application's model becomes unstable and each `$digest` cycle triggers a state change and subsequent `$digest` cycle. Angular detects this situation and prevents an infinite loop from causing the browser to become unresponsive.
For example, the situation can occur by setting up a watch on a path and subsequently updating the same path when the value changes.
```
$scope.$watch('foo', function() {
  $scope.foo = $scope.foo + 1;
});
```
 |