标签: angular typescript currency-pipe
我检查了typeof变量,它是number。但是,CurrencyPipe仍然会抛出无效的参数异常。
typeof
number
currencyPipe.transform(myNum, 'USD', true, '1.2-2');
对于输入,CurrencyPipe是否对类型number有其他限制?
答案 0 :(得分:0)
CurrencyPipe对输入有其他限制吗?
没有。我们只能假设你所做的number检查是错误的。