- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
These docs说明如下:
If emitEvent is true, this change will cause a valueChanges event on the FormControl to be emitted. This defaults to true (as it falls through to updateValueAndValidity).
updateValueAndValidity
是什么?
最佳答案
您可以订阅控件或整个表单的值更改。
updateValueAndValidity
允许您修改一个或多个表单控件的值,并且该标志允许您指定是否要将值发送给 valueChanges
订阅者。
关于angular - 什么是 updateValueAndValidity,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42197806/
如果输入值是整数,我有一个附加小数点的指令。下面是实现。 import { Directive, ElementRef, Input, OnInit, HostListener, forwardRef
These docs说明如下: If emitEvent is true, this change will cause a valueChanges event on the FormControl
在我的 Angular 4 应用程序中,我有一个包含多个控件的表单。 在某些时候我需要强制更新它们的有效性,所以我在做: this.form.get('control1').updateValueAn
我试图根据某些条件在formGroup控件中添加和删除验证器。 当我通过formGroup.updateValueAndValidity()更新验证程序以使其整体不更新时,好像我正在为每个控件(即fo
我正在尝试使用 FormControls 在 Angular2 中进行日期验证。我有一个开始和结束日期。我需要验证开始日期是否在结束日期之前。以下是当控件的值发生变化时我如何编辑控件上的验证器: th
我升级到 rc.4 并尝试使用新的 forms-api。这是我得到的: “类型错误:this.form.updateValueAndValidity 不是函数” 异常起源于 Angular 内的“fo
我是一名优秀的程序员,十分优秀!