2

Now i have: <span>{{(price | currency: 'EUR': true)}}</span>

and this outputs with standard format 1,000.00

but i need this format 1.000,00

Yaroslav Polubedov
  • 1,352
  • 2
  • 11
  • 13

1 Answers1

6

In AppModule class change locale.

@NgModule({
  declarations: [
     //
  ],
  imports: [
    //
  ],
  providers: [
    //
  { provide: LOCALE_ID, useValue: "de-DE" }

],
  bootstrap: [AppComponent]
})
export class AppModule { }`

de-DE is just an example, use whatever locale u want.

More info here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat#Using_locales

SeaBiscuit
  • 2,553
  • 4
  • 25
  • 40