title: Angular 5, input formatting and parsing, what is a standard solution
body: <p>I have an input field and want to enter a float number using a German locale. My solution is following, it is working, but it is complicated and there should be a better approach?</p>
  
  <pre><code>&lt;input matInput [ngModel]="amount | number: '0.2-2'" 
  (blur)="transformAmount($event)" (keyup.enter)="transformAmount($event)"/&gt;
  
  transformAmount(event) {
    console.log(event.target.value);
    this.amount = parseFloat(event.target.value.replace('.', '').replace(',','.'));
    console.log('amount=' + this.amount);
  }
  </code></pre>