• Overview
@angular/forms

NgControlStatus

directive

Directive automatically applied to Angular form controls that sets CSS classes based on control status.

API

  
    class NgControlStatus extends AbstractControlStatus {}
  
  

isTouched

boolean

isUntouched

boolean

isPristine

boolean

isDirty

boolean

isValid

boolean

isInvalid

boolean

isPending

boolean

isSubmitted

boolean

Description

Directive automatically applied to Angular form controls that sets CSS classes based on control status.


Exported by

Usage Notes

CSS classes applied

The following classes are applied as the properties become true:

  • ng-valid
  • ng-invalid
  • ng-pending
  • ng-pristine
  • ng-dirty
  • ng-untouched
  • ng-touched
Jump to details