I have a form with fields that are editable by the user. Some of them, until they are $dirty (edited by the user) will update automatically with suggested values.
I want to mark this change (flash the border of the input etc) so that the user can see what fields have changed.
How can i do this for all the inputs in the form? (about 50 inputs).
Example: I have text inputs
- X
- Y
- Area
- Perimeter.
User will usually enter values for X and Y. I have a $watch on these fields that will call a web service (/calculate?x=3&y=2) which will return {perimeter: 12; area: 6}. These values are auto completed in the Area and Perimeter inputs. When this happens, i want to add a CSS class to these fields so that the user knows they where automatically updated.
I know that i can add the CSS class in the $watch but i have more than one watcher and i would like to not add this logic to the already complex form. My thoughts where to have a "onchange" that works for inputs that where changed programatically and that can be applied on many inputs (directive on form, or directive on inputs or a watcher but on the form fields, not the model).