Hello angular friends,
I'm working on an angular2 app (multiple actually). And I live in the Netherlands.
Currently I'm formatting my currency with the following:
{{someIntegerWithCentsToBeDivided / 100 | currency:'EUR':true:'1.0-2'}}
This displays something like 500 to be Eurosign 5 and 501 to be Eurosign 5.01.
Now we dutchies really like comma's the other way around so does anyone know how to change the . to a ,?
Bonus points if someone knows how to show 5,- optionally when there is no cents. My thoughts now would be to extend the CurrencyPipe
you need import that
import { registerLocaleData } from '@angular/common';
import localeIt from '@angular/common/locales/it'
registerLocaleData(localeIt, 'it');
and add that pipe in view
{{ 1000 | currency: 'EUR':'symbol':'.2-2':'it' }}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With