1<form (ngSubmit)="onSubmit()" #testForm="ngForm" ngNativeValidate>
2 <input type="text" id="test1" name="test1" [(ngModel)]="test" required>
3 <input type="text" id="test2" name="test2" [(ngModel)]="test" [required]="true">
4 <input type="text" id="test3" name="test3" [(ngModel)]="test" [attr.required]="true">
5 <button type="submit">submit</button>
6</form>
7
8
9<-- The important thing here is the "ngNativeValidate" -->