Angular2 ngModel inside of ngFor
<p>I am trying to bind an array of strings from my inputs, so in the html file I wrote this:</p>

<pre><code>&lt;div *ngFor="let word of words; let in=index" class="col-sm-3"&gt;
      &lt;div class="form-group"&gt;
        &lt;input type="text" [(ngModel)]="words[in]"  class="form-control" [attr.placeholder]="items[in]" required&gt;
      &lt;/div&gt;
  &lt;/div&gt;
</code></pre>

<p>But this didn't work as expected because when I log the words variable it show an empty array as initialized in my Component class. Also, I log the variable from another component should that supposed to be the issue for my problem. I have two components:</p>

<ul>
<li>The form component that contains an array of query components.</li>
<li>The query child component that has an array of words strings.</li>
</ul>

<p>So, the words variable is declared into the queries component but I am logging this variable through the form component like this:</p>

<pre><code>console.log(JSON.stringify(this.queries));
</code></pre>

<p>While queries is an array of Query in the form component:</p>

<pre><code>queries:Query[] = [];
</code></pre>

<p>Thanks for your help!</p>