I have a form with some fields where I need to apply a pipe currency
. My form looks something like this:
Which throws me in console a warning about the combination of ngModel
Y formControlName
. Where it indicates that it is an obsolete property for Angular 6 and 7.
It looks like you're using ngModel on the same form field as formControlName.
Support for using the ngModel input property and ngModelChange event with
reactive form directives has been deprecated in Angular v6 and will be removed
in Angular v7.
For more information on this, see our API docs here:
https://angular.io/api/forms/FormControlName#use-with-ngmodel
Besides being obsolete to use [(ngModel)]= "number | currency"
in my pipe gives me a lot of console errors.
My intention with these fields is that when they write the values like:
1900
24700
19299433
The pipe currency
show them as:
$ 1,900.00
$ 24,700.00
$ 19,299,433.00
How could I achieve this?