@keeper3000 wrote:
I’m trying to use Currency Pipe but keep getting the error:
Missing locale data for the locale “USD”.
I have this in my app.module.ts:
providers: [ {provide: ErrorHandler, useClass: IonicErrorHandler}, {provide: LOCALE_ID, useValue: "en-US"}, ]and in my typescript file I have the following:
public currencyPipe: CurrencyPipe = new CurrencyPipe('USD');I use it like this:
toCurrency(value: any) { if (this.currencyPipe == null) { return '0'; } return this.currencyPipe.transform(value, 'USD', true, '1.0-0'); }Anyone have any suggestions? I’ve tried en-US and $ instead of USD, nothing has worked. In the ionic 2 beta releases this worked ok.
Posts: 1
Participants: 1
