NgControlStatus
指令自动应用于 Angular 表单控件,该控件会根据控件状态设置 CSS 类。
Directive automatically applied to Angular form controls that sets CSS classes based on control status.
Exported from
选择器
[formControlName]
[ngModel]
[formControl]
说明
应用的 CSS 类
CSS classes applied
当这些属性变为 true 时,将应用以下类:
The following classes are applied as the properties become true:
- ng-valid
- ng-invalid
- ng-pending
- ng-pristine
- ng-dirty
- ng-untouched
- ng-touched