On this page
NgControlStatus
directive
npm Package | @angular/forms |
---|---|
Module | import { NgControlStatus } from '@angular/forms'; |
Source | forms/src/directives/ng_control_status.ts |
Overview
@Directive({ selector: '[formControlName],[ngModel],[formControl]', host: ngControlStatusHost })
class NgControlStatus extends AbstractControlStatus {
}
Selectors
[formControlName] [ngModel] [formControl]
Description
Directive automatically applied to Angular form controls that sets CSS classes based on control status. The following classes are applied as the properties become true:
- ng-valid
- ng-invalid
- ng-pending
- ng-pristine
- ng-dirty
- ng-untouched
- ng-touched
Constructor
constructor(cd: NgControl)
© 2010–2018 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v5.angular.io/api/forms/NgControlStatus