Angular2: use [(ngModel)] with [ngModelOptions]="{standalone: true}" to link to a reference to model's property
<p>Let's say I have a typescript object of type Mailtype like following:</p>
<pre><code>export class Mailtype {
  constructor(
    public name?: string,
    public locale?: string,
    public email?: string,
    public properties? : Property[]
  ) {  }
}
</code></pre>
<p>Where its &quot;properties&quot; field is an array of type Property:</p>
<pre><code>export class Property {
  constructor(
    public name?: string,
    public type?: string,
    public example?: string,
    public required?: boolean,
    public masked?: boolean
  ) {  }
}
</code></pre>
<p>Now in my component I have a single Mailtype object and the html has a form element used for editing and adding to the properties array of the Mailtype:</p>
<pre><code>&lt;form&gt;
   &lt;tr *ngFor=&quot;let property of model.properties; let i=index&quot;&gt;
          &lt;td&gt;
            &lt;input type=&quot;text&quot; [(ngModel)]=&quot;property.name&quot; required&gt;
          &lt;/td&gt;
  &lt;/tr&gt;
  &lt;button (click)=&quot;onAddProperty()&quot;&gt;Add property&lt;/button&gt;
&lt;/form&gt;
</code></pre>
<p>component:</p>
<pre><code>export class MailtypeComponent {
  model : Mailtype;
  constructor() {
    this.model = new Mailtype('','','',[]);
    this.model.properties.push(new Property());
  }

  onAddProperty() {
    this.model.properties.push(new Property());
  }
}
</code></pre>
<p>I was wondering if I'm not allowed to use [(ngModel)] to link to a reference &quot;property&quot; to the array element in the array, especially at the same time I'm iterating the array?  Because it throws the following error for the above code:</p>
<pre><code>ORIGINAL EXCEPTION: 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: &lt;input [(ngModel)]=&quot;person.firstName&quot; name=&quot;first&quot;&gt;
                      Example 2: &lt;input [(ngModel)]=&quot;person.firstName&quot; [ngModelOptions]=&quot;{standalone: true}&quot;&gt;
</code></pre>
<p>So it's suggesting I use either <code>[ngModelOptions]=&quot;{standalone: true}&quot;</code> or add a name field to the html. And it looks like <code>[ngModelOptions]=&quot;{standalone: true}&quot;</code> works in this case. What does <code>standalone: true</code> actually mean since I cannot find any documentation about it?</p>