projects/congarevenuecloud/ecommerce/src/lib/modules/pricing/pipes/convert.pipe.ts
This pipe is a work in progress.
Core pipe to convert a number into the currency and format specified by the user. By default conversion is done based on the currency ISO code defined in the price list. However, user can also pass the currency ISO code that needs to be accounted for during the currency conversion. Additionally user can pass the display currency symbol and decimal representation of the currency value.
<!-- Renders $5.55 -->
<span>{{5.55 | convertCurrency | async}}</span>
<!-- Renders €65.23 -->
<span>{{65.23 | convertCurrency: 'EUR' | async}}</span>
<!-- Renders CA$821.36 -->
<span>{{821.36 | convertCurrency: 'CAD': 'symbol' | async}}</span>
Name | convertCurrency |
transform | |||||||||||||||||||||||||
transform(value: number, currencyIsoCode: string, display: "code" | "symbol" | "symbol-narrow" | string | boolean, digitsInfo: string)
|
|||||||||||||||||||||||||
Defaulted to the currency code defined on price list. Can take values like 'code', 'symbol', 'symbol-narrow', a customized string or boolean. Defaulted to symbol-narrow
Parameters :
Returns :
any
|