$ injector:nomod模块'postserviceApp'不可用

时间:2019-01-08 12:34:50

标签: angularjs angular-ui-grid ui-grid

我下面的代码在chrome和mozilla浏览器中运行。

 var app = angular.module('postserviceApp', ['ngAnimate', 'ngTouch', 'ui.grid', 'ui.grid.saveState', 'ui.grid.selection', 'ui.grid.cellNav', 'ui.grid.resizeColumns', 'ui.grid.moveColumns', 'ui.grid.pinning', 'ui.grid.grouping','ui.grid.pagination']);

    app.controller('postserviceCtrl', ['$scope', '$http','$timeout' ,'$compile','$sce','uiGridConstants', function ($scope, $http,$timeout, $compile,$sce, uiGridConstants) {
        var colCount=[];
        var rowCount;
        var userlistid;
        var rosterOrganization = $j('.rosterOrganization').val();
        var sortcolumn = "";
        var sorttype = "";
        var enableSort = false;
        if(rosterOrganization == 'volunteer') {
            enableSort = true;
        }
        $scope.removeFieldOrder = [];
        $scope.fieldcount = 0;
        $scope.fieldorder=[];
        $scope.sortedArr = [];
        $scope.excelfieldorder=[];
        $scope.gridOptions = {          
            enableColumnResizing: true,
            enableColumnMoving: true,
            enableSorting: enableSort,
            enableHiding: false,
            onRegisterApi: function(gridApi){
                $scope.gridApi = gridApi;   
                $scope.gridApi.colMovable.on.columnPositionChanged($scope, saveOrder);              
            }
        };  
    }]);

但是IE和Safari无法运行它。它显示以下错误:

  

错误:[$ injector:nomod]模块'postserviceApp'不可用!您   拼写错误的模块名称或忘记加载它。如果注册   一个模块,确保您将依赖项指定为第二个   论点。

0 个答案:

没有答案