Adds ng-dirty and removes ng-pristine when cancel is clicked.

I am sure there is an 'angular way' of doing that, but I couldn't figure it out and would appreciate some help.