簡體   English   中英

劍道的角度指令:“劍道”是否未定義?

[英]Angular Directives for Kendo: “kendo” is undefined?

我正在嘗試在Angular應用程序的Kendo頁面上使用演示項目。 大多數都可以正常工作,但是其中一些拋出“未定義”對象的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.tostring() ”(如kendo.tostring()

這使我相信某些地方缺少某些代碼。

我已經按照指示包括kendo.core.min.jskendo.ui.core.min.jsangular-kendo.js

請嘗試使用此代碼來驗證您的kendo.version在全局名稱空間對象“ kendo”中是否正確。

https://jsbin.com/hakufipici/edit?html,js,output

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM