fix(common): export currencies via getCurrencySymbol
(#20983)
PR Close #20983
This commit is contained in:

committed by
Kara Erickson

parent
2fc4cf67be
commit
fecf768f43
@ -8,7 +8,7 @@
|
||||
|
||||
import {Inject, LOCALE_ID, Pipe, PipeTransform} from '@angular/core';
|
||||
import {formatNumber} from '../i18n/format_number';
|
||||
import {NumberFormatStyle, findCurrencySymbol, getLocaleCurrencyName, getLocaleCurrencySymbol} from '../i18n/locale_data_api';
|
||||
import {NumberFormatStyle, getCurrencySymbol, getLocaleCurrencyName, getLocaleCurrencySymbol} from '../i18n/locale_data_api';
|
||||
import {invalidPipeArgumentError} from './invalid_pipe_argument_error';
|
||||
|
||||
/**
|
||||
@ -143,7 +143,7 @@ export class CurrencyPipe implements PipeTransform {
|
||||
|
||||
let currency = currencyCode || 'USD';
|
||||
if (display !== 'code') {
|
||||
currency = findCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow');
|
||||
currency = getCurrencySymbol(currency, display === 'symbol' ? 'wide' : 'narrow');
|
||||
}
|
||||
|
||||
const {str, error} = formatNumber(value, locale, NumberFormatStyle.Currency, digits, currency);
|
||||
|
Reference in New Issue
Block a user