Hi Sanders,

Thank you for your suggestion. I tried it but get the following error:
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
.


      Example 1: <input [(ngModel)]="person.firstName" name="first">
      Example 2: <input [(ngModel)]="person.firstName" 
[ngModelOptions]="{standalone: 
true}">

I am not sure of the implications of adding the *ngModelOptions* attribute. 
Would you know or is it better if I just stick to specifying unique names?

Regards,

Anjum.


On Friday, August 12, 2016 at 4:34:59 AM UTC+1, Sander Elias wrote:
>
> Hi Ajum
>
> Or leave the name attribute off completely.
>
> Regards
> Sander
>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to