Mask or format value in input on angular2

1

How can I do to format or use masks on inputs with angle2, for example for money

In this input:

<input type="text" class="form-control input-sm text-right" id="representPercDiagnostico" 
                    placeholder="DIAGNÓSTICO"
                    required [(ngModel)]="questionario3.RepresentPercDiagnostico" (blur)="somaValores()">

If the user enters a value it will appear as typed, but I would like it to appear formatted, for example: if the user types 205.5 I would like 205.50 to appear.

In other cases also use masks for phone numbers, for example: (00) 12345678.

    
asked by anonymous 06.04.2016 / 21:34

0 answers