Alessandro Celeghin
Alessandro Celeghin

Reputation: 4189

angular 4 Currency pipe don't format numbers correctly

I am using a currency pipe to display the € correct format:

{{value | currency:'EUR':true}}

I see a format like this:

€30.00

but I want this (italian format):

€30,00

EDIT: Ok the custom pipe,but as you can see in the documentation CurrencyPipe and in the browser support Browser support, this pipe uses the Internationalization API so it should be in the correct locale ID (I am using Chrome latest)

Upvotes: 0

Views: 3398

Answers (1)

Sajeetharan
Sajeetharan

Reputation: 222522

You can set the locale-id which you could add to the providers

 providers: [{provide: LOCALE_ID, useValue: 'de-DE'}],

and then,

in template

 <h2>Price:<h2>
 {{price|currency:'EUR':true}}

DEMO

Upvotes: 1

Related Questions