From 26fb884ede1be163122766a1a47896b8fc3bd39c Mon Sep 17 00:00:00 2001 From: Strikeskids Date: Fri, 24 Jul 2015 15:01:11 -0400 Subject: [PATCH] docs($rootScope.Scope): improve clarity describing $watch with no listener The previous explanation in parentheses created a bit of confusion because the documentation stated to leave off the `listener`, but then said "be prepared for multiple calls to your listener". The new explanation clarifies that it is indeed the `watchExpression` that will be executed multiple times. Closes #12429 --- src/ng/rootScope.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ng/rootScope.js b/src/ng/rootScope.js index 9fdd307c4f48..6dff62a670bf 100644 --- a/src/ng/rootScope.js +++ b/src/ng/rootScope.js @@ -274,9 +274,9 @@ function $RootScopeProvider() { * * * If you want to be notified whenever {@link ng.$rootScope.Scope#$digest $digest} is called, - * 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.) + * you can register a `watchExpression` function with no `listener`. (Be prepared for + * multiple calls to your `watchExpression` because it will execute multiple times in a + * single {@link ng.$rootScope.Scope#$digest $digest} cycle if a change is detected.) * * After a watcher is registered with the scope, the `listener` fn is called asynchronously * (via {@link ng.$rootScope.Scope#$evalAsync $evalAsync}) to initialize the