我在我的应用程序中使用angular-nvd3。在运行jshint任务时,它显示错误:d3不是defiend。
这是我的控制器使用d3:
ref = cordova.InAppBrowser.open(path, '_self', 'location=no,toolbar=yes,closebuttoncaption=Close');
ref.addEventListener('loadstop', function (event) {
if (event.url.match("mobile/close")) {
ref.close();
}
});
答案 0 :(得分:3)
签入.jshintrc文件
如果在全局变量
下定义“d3” "globals": {
"d3": true
}