剑道的Angular指令:" Kendo "是未定义的

Angular Directives for Kendo: "kendo" is undefined?

本文关键字:quot 未定义 Kendo Angular 指令      更新时间:2023-09-26

我试图在我的Angular应用程序中使用Kendo页面上的演示项目。大多数工作正常,但其中一些会抛出"undefined"对象的JSHINT错误,例如:

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"是未定义的(如kendo.tostring())

这让我相信一些代码丢失了。

我已经包括了kendo.core.min.js, kendo.ui.core.min.js, angular-kendo.js作为指示

请尝试此代码验证您的剑道。版本在全局命名空间对象"kendo"中是正确的。

https://jsbin.com/hakufipici/edit?html、js、输出

$(function(){
   if(kendo === "undefined"){
     alert('no kendo');
   }else{
     alert(kendo.version);
   }
    });