Angular2 Currency Pipe change decimal separator

后端 未结 4 1139
后悔当初
后悔当初 2021-02-07 23:08

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 followi

4条回答
  •  被撕碎了的回忆
    2021-02-07 23:27

    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' }}
    

提交回复
热议问题