我刚刚在我的angularjs应用中安装了moment.js。
但是jshint一直警告未定义时刻。
public/js/services/notifications.js
16 | console.log(moment.locale('fr'));
^ 'moment' is not defined.
最佳答案
为您的.jshint文件的全局配置添加时间
{
..,
"globals": {
..,
"moment" : false
}
}
关于angularjs - 如何在没有jshint警告的情况下以 Angular 定义自定义程序包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25227444/