API Reference / @dasch-ng/utils / intl/src / IntlCurrencyPipe
Class: IntlCurrencyPipe
Defined in: libs/ng/utils/intl/src/lib/intl-currency.pipe.ts:24
Formats a currency amount with Intl.NumberFormat.
Example
html
{{ 12.99 | intlCurrency: 'EUR' }} <!-- €12.99 -->
{{ order.totalCents | intlCurrency: 'EUR' : { minorUnits: true } }}
{{ 1299 | intlCurrency: 'JPY' : { minorUnits: true } }} <!-- ¥1,299 -->
{{ 12.99 | intlCurrency: 'EUR' : { currencyDisplay: 'code' } : 'de-DE' }} <!-- 12,99 EUR -->Extends
IntlPipeBase
Implements
PipeTransform
Constructors
Constructor
new IntlCurrencyPipe():
IntlCurrencyPipe
Returns
IntlCurrencyPipe
Inherited from
IntlPipeBase.constructor
Methods
locale()
protectedlocale(locale?):string
Defined in: libs/ng/utils/intl/src/lib/formatter-cache.ts:29
Parameters
locale?
string
Returns
string
Inherited from
IntlPipeBase.locale
transform()
transform(
amount,currency,options?,locale?):string|null
Defined in: libs/ng/utils/intl/src/lib/intl-currency.pipe.ts:25
Parameters
amount
number | null | undefined
currency
string | null | undefined
options?
IntlCurrencyOptions = {}
locale?
string
Returns
string | null
Implementation of
PipeTransform.transform