[ Web Proxy ]
URL:
Viewing: https://angular.dev/api/forms/NgControlStatus [Back]  [Original]

NgControlStatus Angular Skip to main content
menu
close
more_horiz
menuAPI
@angular/forms

NgControlStatus

directive
stable

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

On this page

    arrow_upward_alt Back to the top

    API

        
          class NgControlStatus extends AbstractControlStatus {  constructor(cd: NgControl);  protected override readonly isTouched: boolean;  protected override readonly isUntouched: boolean;  protected override readonly isPristine: boolean;  protected override readonly isDirty: boolean;  protected override readonly isValid: boolean;  protected override readonly isInvalid: boolean;  protected override readonly isPending: boolean;  protected override readonly 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

    Web Proxy Viewer  |  New URL  |  Original Page