2016-03-28 22 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 
})(); 
相關問題