angular js set form dirty software

my checkboxes trigger a function with several operations for programmatically manipulating the model, and this does not seem to allow the form to get dirty.

based on the fact that my form is called "testForm", how would I include a link in my existing function to set a dirty form when this flag calls it when clicked?

I need to refer to the name of the form or is this a case of installing a dirty model such as

$scope.$dirty = true; 
+6
source share
1 answer
 $form.$setDirty(); $form.email.$dirty = true; 

Here $ form = form.
email = field name.

+5
source

Source: https://habr.com/ru/post/1245618/


All Articles