aboutsummaryrefslogtreecommitdiffstats
path: root/docs/content/error
diff options
context:
space:
mode:
authorKen Sheedlo2013-08-07 15:22:21 -0700
committerKen Sheedlo2013-08-07 15:26:27 -0700
commit7f14cdeeb531d140b25b10f5eb7d6643cd950210 (patch)
tree51e4a6ac67a7e1a9579c447e51efd9d468275051 /docs/content/error
parentca09a0db2f57ead5583fdf7968f525a6dcf86a9f (diff)
downloadangular.js-7f14cdeeb531d140b25b10f5eb7d6643cd950210.tar.bz2
docs(minerr): add description for $rootScope:infdig
Diffstat (limited to 'docs/content/error')
-rw-r--r--docs/content/error/rootScope/infdig.ngdoc10
1 files changed, 10 insertions, 0 deletions
diff --git a/docs/content/error/rootScope/infdig.ngdoc b/docs/content/error/rootScope/infdig.ngdoc
index 82bcc075..cffe4de2 100644
--- a/docs/content/error/rootScope/infdig.ngdoc
+++ b/docs/content/error/rootScope/infdig.ngdoc
@@ -2,3 +2,13 @@
@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;
+});
+``` \ No newline at end of file