angular: [Bug][V2] Currency pipe :symbolDisplay true not working

I’m using the currency pipe with beta.0, and with the following code inside ionic 2:

<ion-card-content>
  Total: {{ total | currency:'COP':true }}
</ion-card-content>

The output should be Total: $ 110,000 but the actual output is this: image

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 22 (4 by maintainers)

Commits related to this issue

Most upvoted comments

Hello, a new option to display either the code/symbol/narrow symbol will be added with the PR to replace the intl API for angular v5 (see #10809). Some countries have multiple money symbols (usually the local symbol is shorter, when the official international symbol is longer and more explicit) ex: the canadian dollar has CA$ by default, but the new narrow symbol will be $. In the case of @luchillo17 COP example, the official symbol for COP is indeed COP, but the narrow symbol will be $. This should cover all use cases.

Aaand those browser vendors aren’t going to provide those overrides, so i guess asking the Intl guys is probably faster and better.

Guess this is not typescript or angular, but a browser (ECMAScript?) issue

Intl.NumberFormat("en-US",{
  style:'currency',
  minimumIntegerDigits:1,
  currency: 'PLN',
  currencyDisplay: 'symbol'
}).format(43);

Displays “PLN43” while

Intl.NumberFormat("en-US",{
  style:'currency',
  minimumIntegerDigits:1,
  currency: 'PLN',
  currencyDisplay: 'name'
}).format(43);

Displays “43.00 Polish zlotys”