我正在使用导出表插件在这里发现的。我添加了模块“智能表”,但是我得到了一个错误:
Module 'smart-table' is not available!
(function() {
angular.module('portal', [
'ui.router',
'ceibo.components.table.export',
'smart-table']);
})();智能表插件文件是:
(function() {
angular.module('smart-table')
.directive('stFilteredCollection', function() {
return {
restrict: 'A',
require: '^stTable',
scope: {
stFilteredCollection: '='
},
controller: 'stTableController',
link: function(scope, element, attr, ctrl) {
scope.$watch(function() {
return ctrl.getFilteredCollection();
}, function(newValue, oldValue) {
scope.stFilteredCollection = ctrl.getFilteredCollection();
});
}
};
});
})();我的错误在哪里?
发布于 2016-03-28 06:45:22
您的最终目标与您的指令是不清楚的,但您的混乱来源可能会与您的模块定义。
根据文件,您目前只为应用程序定义了一个模块--即portal。您的portal模块依赖于smart-table,但这种依赖不允许您突然向该模块添加新内容。
早期的预感表明,您需要将要引用的模块更改为应用程序中定义的模块。
angular.module('portal')
.directive('stFilteredCollection', function()https://stackoverflow.com/questions/36257233
复制相似问题