mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-05-12 19:29:42 +08:00
docs($rootScope): fix typos and minor wording tweaks on $watch
This commit is contained in:
@@ -221,18 +221,18 @@ function $RootScopeProvider(){
|
||||
* reruns when it detects changes the `watchExpression` can execute multiple times per
|
||||
* {@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
|
||||
* 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
|
||||
* {@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.
|
||||
* - 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 100 to prevent infinity loop deadlock.
|
||||
* limit is 100 to prevent an infinite loop deadlock.
|
||||
*
|
||||
*
|
||||
* If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called,
|
||||
* you can register an `watchExpression` function with no `listener`. (Since `watchExpression`,
|
||||
* you can register a `watchExpression` function with no `listener`. (Since `watchExpression`
|
||||
* can execute multiple times per {@link ng.$rootScope.Scope#$digest $digest} cycle when a change is
|
||||
* detected, be prepared for multiple calls to your listener.)
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user