From a06cf367e4af6925484f4dd85e1e1c03e860b576 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Thu, 29 May 2014 12:42:10 +0100 Subject: [PATCH] First cut at doc change --- src/ng/rootScope.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index f4fed5096c76..5fc6fa0fc8c3 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -223,10 +223,14 @@ function $RootScopeProvider(){ * {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.) * - The `listener` is called only when the value from the current `watchExpression` and the * previous call to `watchExpression` are not equal (with the exception of the initial run, - * see below). The inequality is determined according to - * {@link angular.equals} function. To save the value of the object for later comparison, - * the {@link angular.copy} function is used. It also means that watching complex options - * will have adverse memory and performance implications. + * see below). Inequality is determined according to reference inequality, + * + * strict comparison via the `!==` Javascript operator, unless `objectEquality == true` + * (see next point) + * - When `objectEquality == true`, inequality of the `watchExpression` is determined + * according to the {@link angular.equals} function. To save the value of the object for + * later comparison, the {@link angular.copy} function is used. This therefore means that + * watching complex objects will have adverse memory and performance implications. * - The watch `listener` may change the model, which may trigger other `listener`s to fire. * This is achieved by rerunning the watchers until no changes are detected. The rerun * iteration limit is 10 to prevent an infinite loop deadlock.