DeprecatedCurrencyPipe
Formats a number as currency using locale rules.
{{ value_expression | currency [ : currencyCode [ : symbolDisplay [ : digits ] ] ] }}
NgModule
输入值
value | any |
参数
currencyCode | string | 可选. 默认值是 |
symbolDisplay | boolean | 可选. 默认值是 |
digits | string | 可选. 默认值是 |
说明
Use currency to format a number as currency.
currencyCodeis the ISO 4217 currency code, such asUSDfor the US dollar andEURfor the euro.symbolDisplayis a boolean indicating whether to use the currency symbol or code.true: use symbol (e.g.$).false(default): use code (e.g.USD).
digitInfoSeeDecimalPipefor 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.
使用说明
Example