2017-08-11 51 views
0

我已经安装了通过NPM numeral.js并在厂商捆绑aurelia.json加入值转换器的功能,然后我用它从一个值转换器:获取类型错误:numeral_1.default不

import numeral from 'numeral'; 

export class CurrencyValueConverter { 
    toView(value) { 
    return numeral(value).format('$0,0.00') 
    } 

} 

我得到以下错误TypeError: numeral_1.default is not a function

回答

2

尝试import * as numeral from 'numeral'

+0

我只是导航到该评论我找到了答案:) – Calin

相关问题