0 votes
in Angular by
What are the state CSS classes provided by ngModel?

1 Answer

0 votes
by

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
...