$setDirty for Angular 1.2

Posted . Visible to the public.

Angular 1.3 offers $setDirty for your ngModelController. If you are stuck on Angular 1.2, do this:

model.$setViewValue(model.$viewValue)

This turns the model dirty, while keeping its value.

Arne Hartherz
License
Source code in this card is licensed under the MIT License.
Posted by Arne Hartherz to makandra dev (2014-12-10 13:25)