Skip to content

Latest commit

 

History

History
13 lines (8 loc) · 340 Bytes

1. ngModel within form tag.md

File metadata and controls

13 lines (8 loc) · 340 Bytes

ngModel within form tag

If ngModel is used within a form tag, either the name attribute must be set or the form control must be defined as 'standalone' in ngModelOptions..

<input [(ngModel)]="person.firstName" name="first" />

or

<input [(ngModel)]="person.firstName" [ngModelOptions]="{ standalone: true }" />