What is updateValueAndValidity
These docs state the following:
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).
What is this updateValueAndValidity
?
You can subscribe to value changes of a control or the whole form.
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.
I concur with above answer. Just to add, all your changes related to control will be reflected only if you put this statement ie
updateValueAndValidity()链接地址: http://www.djcxy.com/p/38346.html