DeprecatedCurrencyPipe
Formats a number as currency using locale rules.
{{ value_expression | currency [ : currencyCode [ : symbolDisplay [ : digits ] ] ] }}
NgModule
Input value
value
|
any |
Parameters
currencyCode
|
string |
Optional. Default is |
symbolDisplay
|
boolean |
Optional. Default is |
digits
|
string |
Optional. Default is |
Description
Use currency
to format a number as currency.
currencyCode
is the ISO 4217 currency code, such asUSD
for the US dollar andEUR
for the euro.-
symbolDisplay
is a boolean indicating whether to use the currency symbol or code.true
: use symbol (e.g.$
).false
(default): use code (e.g.USD
).
digitInfo
SeeDecimalPipe
for detailed description.
WARNING: this pipe uses the Internationalization API which is not yet available in all browsers and may require a polyfill. See Browser Support for details.
Usage notes
Example