Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit 683d722

Browse files
dbwhddn10petebacondarwin
authored andcommitted
docs($rootScope): correct the $watch listener parameter description
Closes #8322
1 parent fefb7ed commit 683d722

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ng/rootScope.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -315,13 +315,12 @@ function $RootScopeProvider(){
315315
*
316316
* - `string`: Evaluated as {@link guide/expression expression}
317317
* - `function(scope)`: called with current `scope` as a parameter.
318-
* @param {function()=} listener Callback called whenever the return value of
319-
* the `watchExpression` changes.
320-
*
321-
* - `string`: Evaluated as {@link guide/expression expression}
322-
* - `function(newValue, oldValue, scope)`: called with current and previous values as
323-
* parameters.
318+
* @param {function(newVal, oldVal, scope)} listener Callback called whenever the value
319+
* of `watchExpression` changes.
324320
*
321+
* - `newVal` contains the current value of the `watchExpression`
322+
* - `oldVal` contains the previous value of the `watchExpression`
323+
* - `scope` refers to the current scope
325324
* @param {boolean=} objectEquality Compare for object equality using {@link angular.equals} instead of
326325
* comparing for reference equality.
327326
* @param {function()=} deregisterNotifier Function to call when the deregistration function

0 commit comments

Comments
 (0)