What are the state CSS classes provided by ngModel?

The ngModel directive updates the form control with special Angular CSS classes to reflect it's state. Let's find the list of classes in a tabular format,

Form control stateIf trueIf false
Visitedng-touchedng-untouched
Value has changedng-dirtyng-pristine
Value is validng-validng-invalid

Author of content
Edit this page

Made by Michael Sakhniuk

Twitter