title: Changes to NgModel on input not updating view
body: <p>I have an input field on my html that I need to limit the value of.</p>
  
  <p>I am trying doing like this:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div *ngFor="let option of options"&gt;
      &lt;input type="text" [ngModel]="option.value" (change)="onChangeValue($event.target.value, option)"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Typescript:</p>
  
  <pre><code>onChangeValue(valueString: string, option: OptionViewModel) {
      var value: number = parseInt(valueString);
  
      // Check some conditions. Simplified code just for example
      if (option.value != value &amp;&amp; value &gt; 5) {
          value = 5;
      }
  
      option.value = value;
  }
  </code></pre>
  
  <p>OptionViewModel:</p>
  
  <pre><code>export class OptionViewModel {
      public optionId: number;
      public description: string;
      public pollId: number;
      public value?: number;
  }
  </code></pre>
  
  <p>I tried using two-way binding, but my code relies on the previous value of option.value, and using two-way binding changes the variable before entering the function.</p>
  
  <p>The problem is, sometimes the input field is not being updated.
  It looks like I just work the first time the value need to be changed, so for example, if input 6 the field is correctly changed to 5, but then if I add a 0 (making it 50), it doesn't correct to 5. </p>
  
  <p>I debbuged the code and it is running the function and changing the option.value, and even using Augury to inspect the objects show the correct value.</p>