Description
The ng:watch
allows you watch a variable and then execute
an evaluation on variable change.
Dependencies
Usage
<ANY ng:watch="expression">
...
</ANY>
Parameters
expression – {expression} –
to eval.
Example
Notice that the counter is incremented
every time you change the text.
<div ng:init="counter=0" ng:watch="name: counter = counter+1">
<input type="text" name="name" value="hello"><br/>
Change counter: {{counter}} Name: {{name}}
</div>