function
Retrieves the currency symbol for a given currency code.
getCurrencySymbol(code: string, format: "wide" | "narrow", locale: string = 'en'): string
code | string | The currency code. |
format | "wide" | "narrow" | The format, |
locale | string | A locale code for the locale format rules to use. Optional. Default is |
string
: The symbol, or the currency code if no symbol is available.
For example, for the default en-US
locale, the code USD
can be represented by the narrow symbol $
or the wide symbol US$
.
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/common/getCurrencySymbol