Angular - Template-Driven Forms
Given this Angular template snippet:
What will happen if the user types "abc" and then clicks outside the input?
<input type="text" name="username" ngModel required minlength="4" #usernameRef="ngModel"> <div *ngIf="usernameRef.invalid && usernameRef.touched"> <small *ngIf="usernameRef.errors?.required">Username is required.</small> <small *ngIf="usernameRef.errors?.minlength">Minimum 4 characters.</small> </div>
What will happen if the user types "abc" and then clicks outside the input?
