什么是 updateValueAndValidity [英] What is updateValueAndValidity

查看:44
本文介绍了什么是 updateValueAndValidity的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这些文档声明如下:

如果emitEvent为真,这个改变会导致一个valueChanges事件发生在要发出的 FormControl.这默认为 true (因为它下降到 updateValueAndValidity).

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?

推荐答案

您可以订阅控件或整个表单的值更改.

You can subscribe to value changes of a control or the whole form.

updateValueAndValidity 允许您修改一个或多个表单控件的值,该标志允许您指定是否希望它向 valueChanges 订阅者发送值.

updateValueAndValidity allows you to modify the value of one or more form controls and the flag allows you to specify if you want this to emit the value to valueChanges subscribers.

这篇关于什么是 updateValueAndValidity的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆