title: ngFor inputs copy values of eachother
body: <p>I'm using Angular5 and would like to create a form where user can insert new records with a button. Each record has many controls in it and should be changed independently from other records. I have done this many times but now I'm getting weird results.</p>
  
  <pre><code>&lt;form #newRequestForm="ngForm"&gt;
      &lt;a class="list-group-item" *ngFor="let detail of currentRequest.details; let index$ = index"&gt;
      .
      .
      .
      &lt;ng-select [items]="products" [searchFn]="searchProduct" (change)="productChanged($event, detail)"&gt;
          &lt;ng-template ng-label-tmp let-item="item"&gt;
              {{item.code}} - {{item.name1}}
          &lt;/ng-template&gt;
      &lt;/ng-select&gt;
      &lt;input class="form-control" name="productname1" type="text" [ngModel]="detail.product.name1" /&gt;
      &lt;input class="form-control" name="productname2" type="text" [ngModel]="detail.product.name2" /&gt;
      &lt;input class="form-control" name="productname3" type="text" [ngModel]="detail.product.name3" /&gt;
  
      &lt;input class="form-control" type="text" name="description" [(ngModel)]="detail.description" /&gt;
  </code></pre>
  
  <p>The problem is that the method called by ng-select onchange <code>productChanged</code> sets the product names of the current selected product. (Products has 3 seperate name fields in erp.) And when this happens all 3 name fields of all records in the form changes to the name fields of the currently selected product. No matter which ng-select I use, all has changed. All the other fields working seperately eg: description.</p>
  
  <p>So I suppose the bug is in the method but it looks like this:</p>
  
  <pre><code>productChanged($event, detail) {
      detail.product = $event;
      console.log('-----------------------------------------');
      this.currentRequest.details.forEach((d, i) =&gt; {
          console.log(i, d.product !== null ? d.product.name1 : '');
      });
  }
  </code></pre>
  
  <p>Yes, I have tried to debug with the good old console.log and it says that the content of each of the detail.products are perfect, according to the last selection of that record's ng-select.</p>
  
  <p>The input controls are still rewritten by whatever select I make. Why?</p>