mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-09 15:24:43 +00:00
docs($rootScope): fix typos and minor wording tweaks on $watch
This commit is contained in:
parent
62bb728d07
commit
03ebecd5eb
1 changed files with 4 additions and 4 deletions
|
|
@ -221,18 +221,18 @@ function $RootScopeProvider(){
|
||||||
* reruns when it detects changes the `watchExpression` can execute multiple times per
|
* reruns when it detects changes the `watchExpression` can execute multiple times per
|
||||||
* {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
|
* {@link ng.$rootScope.Scope#$digest $digest()} and should be idempotent.)
|
||||||
* - The `listener` is called only when the value from the current `watchExpression` and the
|
* - 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
|
* 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
|
* {@link angular.copy} function is used. It also means that watching complex options will
|
||||||
* have adverse memory and performance implications.
|
* have adverse memory and performance implications.
|
||||||
* - The watch `listener` may change the model, which may trigger other `listener`s to fire. This
|
* - 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
|
* 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,
|
* 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
|
* 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.)
|
* detected, be prepared for multiple calls to your listener.)
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue