角度抽象控件删除错误
发布时间:2020-12-17 10:25:50 所属栏目:安全 来源:网络整理
导读:我想要一种方法从表单控件中删除特定的错误,而不是清除所有错误. control.setError({'firstError': true}) 并删除特定的错误,如 control.removeError({'firstError}) and not control.setError({null}) 我试过了 control.setError({'firstError': false}) 但
我想要一种方法从表单控件中删除特定的错误,而不是清除所有错误.
control.setError({'firstError': true}) 并删除特定的错误,如 control.removeError({'firstError}) and not control.setError({null}) 我试过了 control.setError({'firstError': false}) 但没有奏效. 任何帮助.谢谢 角4.1.1
您可以像这样删除:
control.setError({'firstError': null}) (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- angular.js 下如何动态插入删除dom节点
- 人人都需要知道的@angular-cli
- angularjs – 离子应用程序无法连接启用服务器的$http
- 一个控制器中的AngularJS window.onbeforeunload正在另一个
- scala – 禁用Akka ActorSystem的默认日志记录
- 如何在Play Framework 2 Scala应用程序中列出public / imag
- 前端开发框架Bootstrap和Knockout.js
- bash – 将所有tar.bz2文件解压缩到一个目录
- angularjs – 我可以从UI运行量角器e2e测试
- angularjs – 你可以将Bootstrap添加到Ionic App吗?