问题描述
Angularjs
正在通过 FormController
运行我的表单(例如跟踪原始、脏等).我不需要这个功能;我确定它会增加我的 $digests
的开销.
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
.
我该如何关闭它?
推荐答案
AFAIK 没有简单的开关来关闭 AngularJS 验证.实际上大部分验证发生在 NgModelController
和输入指令中 - 基本上是 input.js 文件.因此,要摆脱内置验证,您必须从此文件(以及其他一些文件,如 select)重新开发代码.
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?
这篇关于禁用表单验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!