I am building an angular app for which I have some forms set up. I have some fields that are required to be filled before submission. Therefore I have added \'required\' on
Since the fields are empty they are not valid, so the ng-invalid and ng-invalid-required classes are added properly.
ng-invalid
ng-invalid-required
You can use the class ng-pristine to check out whether the fields have already been used or not.
ng-pristine