I think the question is quite explanatory, but I would like to know how I can create mask
using decimal numbers to simulate the real currency ( 1.000,00
).
I think the question is quite explanatory, but I would like to know how I can create mask
using decimal numbers to simulate the real currency ( 1.000,00
).
For the number of decimal places, you can use the% s of the angular filter itself:
{{ value_expression | number [ : digitsInfo [ : locale ] ] }}
In your example, you could use:
{{ 1000 | number : '.2' }}
For the number format to be "." for separating thousands, and "," to separate the decimal places, include in html
:
import { LOCALE_ID } from '@angular/core';
...
@NgModule({
...
providers: [
...
{ provide: LOCALE_ID, useValue: 'pt-BR' }
]
The ion-currencymask plugin helped me a lot for this purpose.