2016-03-28 68 views
1

我正在使用导出表插件 https://github.com/Epotignano/angular-export-table。 我已经添加模块“门户”,但我得到一个错误我有添加导出插件,我得到错误模型“门户”不可用

  • 模块“portal'not可用 我加入的依赖,但我得到同样的错误。
  • 这是我的依赖代码

    (function() { 
    
    angular.module('portal', [ 
    'ui.router', 
    'ceibo.components.table.export', 
    'portal']); 
    })(); 
    and smart table plugin code is 
    
    (function(){ 
    angular.module('portal') 
    .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(); 
         }); 
         } 
        }; 
    }); })(); 
    

    请让我知道什么是我的错误。

+0

如果您认为给出的答案是正确的,那么请接受答案:) – Shree29

回答

1

看起来你没有正确加载你的模块。在您的代码中,您需要删除portal从创建portal模块时试图将其本身用作依赖项。请参阅下面的评论。

angular.module('portal', [ 
    'ui.router', 
    'ceibo.components.table.export', 
    'portal']); //REMOVE THIS 
})(); 
相关问题