I checked the typeof
the variable and it is a number
. However, CurrencyPipe still throws the invalid argument exception.
currencyPipe.transform(myNum, 'USD', true, '1.2-2');
Does CurrencyPipe have other restrictions for input than type number
?
I checked the typeof
the variable and it is a number
. However, CurrencyPipe still throws the invalid argument exception.
currencyPipe.transform(myNum, 'USD', true, '1.2-2');
Does CurrencyPipe have other restrictions for input than type number
?
Does CurrencyPipe have other restrictions for input than type number?
No. We can only assume that the check for number
that you did is wrong.