This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree 1 file changed +8
-4
lines changed
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -223,10 +223,14 @@ function $RootScopeProvider(){
223
223
* {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
224
224
* - The `listener` is called only when the value from the current `watchExpression` and the
225
225
* previous call to `watchExpression` are not equal (with the exception of the initial run,
226
- * see below). The inequality is determined according to
227
- * {@link angular.equals} function. To save the value of the object for later comparison,
228
- * the {@link angular.copy} function is used. It also means that watching complex options
229
- * will have adverse memory and performance implications.
226
+ * see below). Inequality is determined according to reference inequality,
227
+ * [strict comparison](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Comparison_Operators)
228
+ * via the `!==` Javascript operator, unless `objectEquality == true`
229
+ * (see next point)
230
+ * - When `objectEquality == true`, inequality of the `watchExpression` is determined
231
+ * according to the {@link angular.equals} function. To save the value of the object for
232
+ * later comparison, the {@link angular.copy} function is used. This therefore means that
233
+ * watching complex objects will have adverse memory and performance implications.
230
234
* - The watch `listener` may change the model, which may trigger other `listener`s to fire.
231
235
* This is achieved by rerunning the watchers until no changes are detected. The rerun
232
236
* iteration limit is 10 to prevent an infinite loop deadlock.
You can’t perform that action at this time.
0 commit comments