title: Pipe, ngModel and ngModelChange
body: <p>I have a two-way data binding with a custom pipe. </p>
  
  <p>My input text field code:</p>
  
  <pre class="lang-HTML prettyprint-override"><code>&lt;input type="text" [ngModel]="post.price | myCurrencyPipe" (ngModelChange)="post.price = $event" name="price" id ="price" (change)="itemPriceUpdate(post)"/&gt;
  </code></pre>
  
  <p>and custom pipe code :</p>
  
  <pre class="lang-ts prettyprint-override"><code>@Pipe({ name: 'myCurrencyPipe'})
  export class MyCurrencyPipe implements PipeTransform{
  
        transform(val:any) {
          var value = parseInt(data);
          var num = '$' + value.toFixed(2).replace(/(\d)(?=(\d\d\d)+(?!\d))/g, "$1,");
          return num;
  
        } 
  </code></pre>
  
  <p>When I go to edit my input field value it displays NaN on keypress.</p>