Error: 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. code example
Example 1: 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.
Example 2: <input [(ngModel)]="person.myfirstName" [ngModelOptions]="{standalone: true}">
Example 2: Error: 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)]="firstname" name="something">