$watchGroup(watchExpressions, listener);
A variant of $watch() where it watches an array of watchExpressions
. If any one expression in the collection changes the listener
is executed.
- The items in the
watchExpressions
array are observed via standard $watch operation and are examined on every call to $digest() to see if any items changes. - The
listener
is called whenever any expression in thewatchExpressions
array changes.
Parameters
Param | Type | Details |
---|---|---|
watchExpressions | Array.<string|Function(scope)> | Array of expressions that will be individually watched using $watch() |
listener | function(newValues, oldValues, scope) | Callback called whenever the return value of any expression in |
Returns
function() |
Returns a de-registration function for all listeners. |
Please login to continue.