title: Angular 2 component model refresh view without model changes
body: <p>I have an Angular 2.4.0 application I'm working on with a form that has some backing Javascript validating/formatting a couple of the fields. When the formatting of the fields completes, the view does not update if the value returned from the formatting matches the original value attached to the model. Is there a way to force the view to update? Since there isn't a model change, forcing a component refresh hasn't had any effect. I'm guessing I'll need to update the view separately with something like jQuery, but I wanted to check if there was a better solution first.</p>
  
  <p><strong>Component:</strong>
      export class Component {
        field: string</p>
  
  <pre><code>  formatField(updatedField: string) {
      this.field = updatedField.replace(new Regexp("[^\\d]", "g"), ""); // remove everything except numbers
    }
  }
  </code></pre>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;html&gt;
    &lt;body&gt;
      &lt;input type="text" [ngModel]="field" (ngModelChange)="formatField($event)"&gt;
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the above example, if the model is "1", then I enter <code>"1;['];["</code>, and <code>formatField</code> returns <code>"1"</code>, the screen will still display <code>"1;['];["</code> when I'm expecting <code>"1"</code> to display instead (which is the returned value of the <code>formatField</code> call).</p>
  
  <p><strong>Edit:</strong> fixed <code>ngModelUpdate</code> to <code>ngModelChange</code> in example (typo). Added Angular 2 version to description.</p>