Kendo的角度指令:“剑道”未定义?
问题描述:
我想在我的Angular应用程序的Kendo页面上使用演示项目。大多数做工精细,但也有少数人被抛出的“不确定”的对象JSHINT错误,例如:Kendo的角度指令:“剑道”未定义?
function MyCtrl($scope) {
$scope.showInContainer = function() {
var date = new Date();
date = kendo.toString(date, "HH:MM:ss.") + kendo.toString(date.getMilliseconds(), "000");
$scope.notf2.show(date, "info");
};
$scope.dismissAll = function() {
$scope.notf1.hide();
$scope.notf2.hide();
};
}
这是说“剑道”未定义(如kendo.tostring()
)
这使我相信某些代码在某处丢失。
我已经包括kendo.core.min.js
,kendo.ui.core.min.js
,angular-kendo.js
遵医嘱
答
请试试这个code验证您kendo.version是正确的在你的全局命名空间的对象,“剑道”。
https://jsbin.com/hakufipici/edit?html,js,output
$(function(){
if(kendo === "undefined"){
alert('no kendo');
}else{
alert(kendo.version);
}
});
如果你被注入'kendo'? –
您可能需要通过那个 – ivarni
注入'$ window'和引用kendo它看起来像kendo对象包含在他们的商业'kendo.all.js'中,但不包含在'kendo.core.js'中。我不能确定。尽管我可以在这里用普通的js来做它。 – Steve