Angularjs
is running my forms through the FormController
(eg tracking pristine, dirty, etc). I don't need this functionality; I'm sure it's adding overhead to my $digests
.
How can I shut it off?
1. On your Google Chrome address bar, type “about:flags” (without the quote) and press Enter. 2. Scroll down the list until you see the option “Disable HTML5 interactive form validation”.
write "novalidate" in form tag.
To ignore HTML validation, you can remove the attribute on button click using JavaScript. Uer removeAttribute() to remove an attribute from each of the matched elements.
If You want to disable the validation for all elements of the form add the novalidate attribute in the form tag which will disable the validation for entire form.
AFAIK there is no simple switch to turn off AngularJS validation. Actually most of the validation happens in the NgModelController
and input directives - basically code in the input.js file. So, to get rid of the built-in validation you would have to re-develop code from this file (plus some others, like select).
Did you identify validation code as a performance bottleneck in your application?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With