Search code examples
angularcurrency-pipe

Angular currency code not working on older Angular version


I am using Angular 7.3.x and updating is not an option and I'm wondering if that has something to do with this.

Basically:

{{ value | currency:'USD' }} gives me $

{{ value | currency:'EUR' }} gives me euro sign

also tried some others like Korea, UK

but I'm trying to format it to Malaysian ringgits with {{ value | currency:'MYR' }} which just gives me 'MYR(value)' when I would expect 'RM(value)'

Is this because I'm using an old Angular version? I can't find documentation for this version, just the most up to date docs, which according to them, this should totally work. https://www.angularjswiki.com/angular/angular-currency-pipe-formatting-currency-in-angular/


Solution

  • Welp looks like I should have been using {{ value | currency : 'MYR' : 'symbol-narrow' }} to get the proper 'RM' I was expecting