1<form #f="ngForm" (ngSubmit)="onSubmit(f)" novalidate>
2 <input name="first" ngModel required #first="ngModel">
3 <input name="last" ngModel>
4 <button>Submit</button>
5</form>
6
7<p>First name value: {{ first.value }}</p>
8<p>First name valid: {{ first.valid }}</p>
9<p>Form value: {{ f.value | json }}</p>
10<p>Form valid: {{ f.valid }}</p>