首先,我对AngularJS非常非常陌生,所以这可能是一个新的问题。
我在app.js文件中声明了我的应用程序依赖关系:
(function () {
angular.module('inspinia', [
'ui.router', // Routing
'oc.lazyLoad', // ocLazyLoad
'ui.bootstrap', // Ui Bootstrap
'pascalprecht.translate', // Angular Translate
'ngIdle', // Idle timer
'ngSanitize', // ngSanitize
])
})();当我像这样将以下依赖项添加到列表的末尾(或开头)时: nestedDataTable:
(function () {
angular.module('inspinia', [
'ui.router', // Routing
'oc.lazyLoad', // ocLazyLoad
'ui.bootstrap', // Ui Bootstrap
'pascalprecht.translate', // Angular Translate
'ngIdle', // Idle timer
'ngSanitize', // ngSanitize
'nestedDataTable'
])})();nestedDataTable负责的功能不起作用。
只有在我添加了一个仅添加了上述依赖项的新function()之后,该功能才能正常工作。如下所示:
(function () {
angular.module('inspinia', [
'ui.router', // Routing
'oc.lazyLoad', // ocLazyLoad
'ui.bootstrap', // Ui Bootstrap
'pascalprecht.translate', // Angular Translate
'ngIdle', // Idle timer
'ngSanitize' // ngSanitize
])
})();
(function () {
"use strict";
angular
.module("inspinia", ["nestedDataTable"])
})();如果我切换这两个函数的顺序,它也不起作用。这没有任何意义,但是,嘿,我是一个新手;)
有没有人能想出一些可能的原因?
发布于 2015-09-18 01:47:08
这是由于我的错误(正如我提到的Newbe)忘记将正确的js文件添加到index.html
https://stackoverflow.com/questions/32632749
复制相似问题