AbstractControlDirectivelink
Base class for control directives.
说明
Only used internally in the forms module.
属性
| 属性名 | 类型 | 说明 |
|---|---|---|
| control | 只读 The | |
| value | 只读 The value of the control. | |
| valid | 只读 A control is In order to have this status, the control must have passed all its validation checks. | |
| invalid | 只读 A control is In order to have this status, the control must have failed at least one of its validation checks. | |
| pending | 只读 A control is In order to have this status, the control must be in the middle of conducting a validation check. | |
| disabled | 只读 A control is Disabled controls are exempt from validation checks and are not included in the aggregate value of their ancestor controls. | |
| enabled | 只读 A control is In other words, it has a status of | |
| errors | 只读 Returns any errors generated by failing validation. If there are no errors, it will return null. | |
| pristine | 只读 A control is Note that programmatic changes to a control's value will not mark it dirty. | |
| dirty | 只读 A control is Note that programmatic changes to a control's value will not mark it dirty. | |
| touched | 只读 A control is marked | |
| status | 只读 | |
| untouched | 只读 A control is | |
| statusChanges | 只读 Emits an event every time the validation status of the control is re-calculated. | |
| valueChanges | 只读 Emits an event every time the value of the control changes, in the UI or programmatically. | |
| path | 只读 Returns an array that represents the path from the top-level form to this control. Each index is the string name of the control on that level. |
方法
Resets the form control. This means by default: | ||
参数
返回值
| ||
For more information, see |
Returns error data if the control with the given path has the error specified. Otherwise returns null or undefined. | ||||
参数
返回值
| ||||
If no path is given, it checks for the error on the present control. |