I'm writing a directive which needs to watch for elements that get updated with a particular class, say .ng-invalid. As you know, .ng-invalid is added to form elements which are invalid.
I need to watch these elements to determine if the class was added or removed.
How can I achieve this?
Thanks in advance