title: Angular ChangeDetection do not display right data
body: <p>I met a situation that i can't solve. 
  My project is using angular 6.
  I have a form displayed like a table using ngFor and i made possible to add rows in the table.</p>
  
  <pre><code>&lt;table class="table"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
              &lt;th&gt;Prestations&lt;/th&gt;
              &lt;th&gt;Unité&lt;/th&gt;
              &lt;th&gt;Prix&lt;/th&gt;
              &lt;th&gt;Pourcentage Promotionnel&lt;/th&gt;
              &lt;th&gt;Activez la promotion?&lt;/th&gt;
              &lt;th&gt;&lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr *ngFor="let prestation of listPrestations"&gt;
              &lt;td class="centering"&gt;
                  &lt;strong&gt;
                      {{ prestation.prestation.label }}
                  &lt;/strong&gt;
              &lt;/td&gt;
              &lt;td class="centering"&gt;
                  &lt;strong&gt;
                      {{ prestation.prestation.unite || 'Non défini' }}
                  &lt;/strong&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;div class="input-group" required&gt;
                      &lt;input type="number" step=0.1 [(ngModel)]="prestation.pricePerUnit" id="prestation-pricePerUnit-{{prestation.prestation.id}}" name="pricePerUnit" class="input-field righting" min=0 placeholder="Prix unitaire" required&gt;
                      &lt;label class="input-label" for="pricePerUnit"&gt;Prix unitaire&lt;/label&gt;
                  &lt;/div&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;div class="input-group"&gt;
                      &lt;input type="number" step=1 [(ngModel)]="prestation.promoPercentage" id="prestation-promoPercentage-{{prestation.prestation.id}}" name="promoPercentage" min=0 max=99 class="input-field righting" placeholder="Pourcentage Promotionnel"&gt;
                      &lt;label class="input-label" for="promoPercentage"&gt;Pourcentage Promotion&lt;/label&gt;
                  &lt;/div&gt;
              &lt;/td&gt;
              &lt;td class="centering"&gt;
                  &lt;input type="checkbox" [(ngModel)]="prestation.promoActivated" id="prestation-promoActivated-{{prestation.prestation.id}}" name="promoActivated" class="" placeholder=""&gt;
              &lt;/td&gt;
              &lt;td class="centering"&gt;
                  &lt;button class="btn btn-danger" (click)="deletePrestation(prestation.prestation.id)"&gt;&lt;i class="fa fa-trash"&gt;&lt;/i&gt;&lt;/button&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>which gave something like that <a href="https://i.stack.imgur.com/Tsurn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Tsurn.png" alt="Picture before click on Ambulance"></a></p>
  
  <p>but when i add a row in my array </p>
  
  <pre><code>add(prestationId: number) {
      var x: ICompanyPrestation[] = [];
      this.tmpPrestation = new CompanyPrestation();
      this.tmpPrestation.company = JSON.parse(JSON.stringify(this.company));
      this.tmpPrestation.prestation = this.prestations.find(prestation =&gt; prestation.id == prestationId);
      if (!this.listPrestations.find(prestation =&gt; prestation.prestation.id == prestationId)) {
          this.listPrestations.push(this.tmpPrestation);
      } else {
          this.isAlreadyIn();
      }
  }
  </code></pre>
  
  <p>i can see that the array contains right datas but seems like original inputs are displayed as 0 "pricePerUnits" in the array or "Prix" on the screen</p>
  
  <p>.
  <a href="https://i.stack.imgur.com/mLFNO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mLFNO.png" alt="console.log of array after click on &quot;ambulance&quot;"></a></p>
  
  <p>It's like changeDetection don't work. </p>
  
  <p><a href="https://i.stack.imgur.com/lwAps.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lwAps.png" alt="Screen after click on &quot;ambulance&quot;"></a></p>
  
  <p>Does someone know what goes wrong in what i am doing?! </p>
  
  <p>Thanks</p>