Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/399.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Kendo AngularJS模块无法加载到自定义Ektron小部件中_Javascript_Angularjs_Kendo Ui_Ektron - Fatal编程技术网

Javascript Kendo AngularJS模块无法加载到自定义Ektron小部件中

Javascript Kendo AngularJS模块无法加载到自定义Ektron小部件中,javascript,angularjs,kendo-ui,ektron,Javascript,Angularjs,Kendo Ui,Ektron,我在尝试在自定义Ektron小部件中加载AngularJS模块时遇到问题。app.js文件以以下内容开头: var app = angular.module('myApp', ['ngAnimate', 'ngRoute', 'kendo.directives', 'chieffancypants.loadingBar']); 我看到的错误是: Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due

我在尝试在自定义Ektron小部件中加载AngularJS模块时遇到问题。app.js文件以以下内容开头:

var app = angular.module('myApp', ['ngAnimate', 'ngRoute', 'kendo.directives', 'chieffancypants.loadingBar']);
我看到的错误是:

Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:modulerr] Failed to instantiate module kendo.directives due to:
Error: [$injector:nomod] Module 'kendo.directives' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
现在,我很确定我没有拼写错误,剑道JavaScript文件已经加载,所以不确定发生了什么。就像最好的问题一样,这是一个间歇性的问题,它只发生在某些页面上,而且只发生在某些时间,我还无法在受影响的页面或它发生的时间中看到任何模式

以下是脚本文件:

<script type="text/javascript" src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="/Includes/js/kendo/angular.js"></script>
<script type="text/javascript" src="/Includes/js/kendo/angular-animate.js"></script>
<script type="text/javascript" src="/Includes/js/kendo/angular-route.js"></script>
<script type="text/javascript" src="/Includes/js/kendo/kendo.all.min.js"></script>
<script type="text/javascript" src="/Includes/js/loading-bar.min.js"></script>
<script type="text/javascript" src="/Includes/js/app.js"></script>

干杯,
Stuart.

Ektron也可能正在加载它自己的jQuery库文件。我会检查页面的HTML源代码,看看是否加载了超过1个jQuery库。当这种情况发生时,它通常会破坏页面上的大部分Javascript


还值得检查Chrome控制台或Firefox的Web Developer工具栏插件,以查看抛出了哪些Javascript错误。您可能会在Javascript中遇到早期错误,这在这里会产生连锁反应。

Ektron绝对会加载它自己的jQuery库,尽管我们已经得到保证,如果我们想使用另一个版本,它不会发生冲突。到目前为止还没有。Chrome或Firefox控制台上没有记录其他错误。