未捕获错误:模块的加载超时:requireJS和angularJS中的authInterceptorService

未捕获错误:模块的加载超时:requireJS和angularJS中的authInterceptorService,angularjs,requirejs,Angularjs,Requirejs,我现在有一个关于我的要求的问题。。它显示一个错误Uncaught错误:模块的加载超时:authInterceptorService 这是我的密码。。有什么问题吗 main.js require.config({ baseUrl: "", paths: { 'angular' : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular.min', 'angular-rout

我现在有一个关于我的要求的问题。。它显示一个错误
Uncaught错误:模块的加载超时:authInterceptorService

这是我的密码。。有什么问题吗

main.js

require.config({
    baseUrl: "",
    paths: {
        'angular'                   : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular.min',
        'angular-route'             : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular-route.min',
        'angular-local-storage'     : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular-local-storage.min',
        'loading-bar'               : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/loading-bar.min',
        'ui-bootstrap-tpls-0.11.0'  : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/ui-bootstrap-tpls-0.11.0.min',
        'angular-idle'              : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular-idle.min',
        'angularAMD'                : 'scripts/angularAMD.min',
        'app'                       : 'app/app',
        'authInterceptorService'    : 'app/Services/authInterceptorService', //services
        'authService'               : 'app/Services/authService' //services
    },

    shim: {
        'angularAMD'                : ['angular'],
        'angular-route'             : ['angular'],
        'angular-local-storage'     : ['angular'],
        'loading-bar'               : ['angular'],
        'ui-bootstrap-tpls-0.11.0'  : ['angular'],
        'angular-idle'              : ['angular'],
        'authInterceptorService'    : ['app'],
        'authService'               : ['app']
    },

    deps : ['app']
});
define(['angularAMD', 'angular-route', 'angular-local-storage', 'loading-bar', 'angular-idle', 'ui-bootstrap-tpls-0.11.0','authInterceptorService'], function (angularAMD) {

    //start of app

    var app = angular.module("Aptus", ['ngRoute', 'LocalStorageModule', 'angular-loading-bar', 'ngIdle', 'ui.bootstrap']);

    app.config(function ($routeProvider) {
        $routeProvider.when("/home", angularAMD.route({
            controller: "homeController",
            templateUrl: "templates/home.html",
            controllerUrl : "app/Controllers/HomeController"
        }));

        $routeProvider.when('/evaluations', angularAMD.route({
            controller: 'EvaluationController',
            templateUrl: 'Projects/Evaluation/templates/evaluation.html',
            controllerUrl: 'app/Controllers/EvaluationController'
        }));
        $routeProvider.when('/evaluate', angularAMD.route({
            controller: 'CriteriaController',
            templateUrl: 'Projects/Evaluation/templates/evaluate.html',
            controllerUrl: 'app/Controllers/CriteriaController'
        }));
        $routeProvider.when("/login", angularAMD.route({
            controller: "loginController",
            templateUrl: "login.html",
            controllerUrl: "app/Controllers/loginController"
        }));
        $routeProvider.when("/summary", angularAMD.route({
            controller: 'SummaryController',
            templateUrl: 'Projects/Evaluation/templates/classes.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/coursesummary", angularAMD.route({
            controller: 'CourseSummaryController',
            templateUrl: 'Projects/Evaluation/templates/coursesummary.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/studentclasses", angularAMD.route({
            controller: 'StudentClasses',
            templateUrl: 'Projects/Evaluation/templates/studentclasses.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/subject", angularAMD.route({
            controller: 'Subject',
            templateUrl: 'Projects/Evaluation/templates/subject.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/user", angularAMD.route({
            controller: 'UserController',
            templateUrl: 'Projects/Evaluation/templates/user.html',
            controllerUrl: 'app/Controllers/SetupController'
        }));
        $routeProvider.when("/role", angularAMD.route({
            controller: 'RoleController',
            templateUrl: 'Projects/Evaluation/templates/role.html',
            controllerUrl: 'app/Controllers/SetupController'
        }));
        $routeProvider.when("/report", angularAMD.route({
            controller: 'RoleController',
            templateUrl: 'Projects/Evaluation/templates/report.html',
            controllerUrl: 'app/Controllers/SetupController'
        }));

        $routeProvider.otherwise({ redirectTo: '/home' });
    });

    app.run(['authService', function (authService) {
        authService.fillAuthData();
    }]);

    app.config(function ($httpProvider) {
        $httpProvider.interceptors.push(['authInterceptorService']);
    });


    app.config(['$keepaliveProvider', '$idleProvider', function ($keepaliveProvider, $idleProvider) {
        $idleProvider.idleDuration(15 * 60);
        $idleProvider.warningDuration(10);
        $keepaliveProvider.interval(15 * 60);
    }]);

    app.run(['$idle', function ($idle) {
        $idle.watch();
    }]);

    app.run(function ($rootScope, localStorageService) {

        //localStorageService.get('currentModule') === 'undefined')
        if (typeof sessionStorage.getItem('currentModule') === 'undefined') {
            var data = {
                moduleName: 'Dashboard',
                moduleDescription: 'Home'
            };
            sessionStorage.setItem('currentModule', JSON.stringify(data));
            //localStorageService.set('currentModule', data);
        }

        $rootScope.currentModule = JSON.parse(sessionStorage.getItem('currentModule')); //localStorageService.get('currentModule');


    });


    app.directive('a', function () {
        return {
            restrict: 'E',
            link: function (scope, elem, attrs) {
                if (attrs.href === '' || attrs.href === '#') {
                    elem.on('click', function (e) {
                        e.preventDefault();
                    });
                }
            }
        };
    });

    //end of app

    return angularAMD.bootstrap(app);
});
我在路径中添加了我的应用程序和服务,因为它无法识别,我也不知道为什么

app.js

require.config({
    baseUrl: "",
    paths: {
        'angular'                   : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular.min',
        'angular-route'             : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular-route.min',
        'angular-local-storage'     : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular-local-storage.min',
        'loading-bar'               : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/loading-bar.min',
        'ui-bootstrap-tpls-0.11.0'  : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/ui-bootstrap-tpls-0.11.0.min',
        'angular-idle'              : 'http://cdn.dbtc.sdb.ph/angularjs/1.2.24/angular-idle.min',
        'angularAMD'                : 'scripts/angularAMD.min',
        'app'                       : 'app/app',
        'authInterceptorService'    : 'app/Services/authInterceptorService', //services
        'authService'               : 'app/Services/authService' //services
    },

    shim: {
        'angularAMD'                : ['angular'],
        'angular-route'             : ['angular'],
        'angular-local-storage'     : ['angular'],
        'loading-bar'               : ['angular'],
        'ui-bootstrap-tpls-0.11.0'  : ['angular'],
        'angular-idle'              : ['angular'],
        'authInterceptorService'    : ['app'],
        'authService'               : ['app']
    },

    deps : ['app']
});
define(['angularAMD', 'angular-route', 'angular-local-storage', 'loading-bar', 'angular-idle', 'ui-bootstrap-tpls-0.11.0','authInterceptorService'], function (angularAMD) {

    //start of app

    var app = angular.module("Aptus", ['ngRoute', 'LocalStorageModule', 'angular-loading-bar', 'ngIdle', 'ui.bootstrap']);

    app.config(function ($routeProvider) {
        $routeProvider.when("/home", angularAMD.route({
            controller: "homeController",
            templateUrl: "templates/home.html",
            controllerUrl : "app/Controllers/HomeController"
        }));

        $routeProvider.when('/evaluations', angularAMD.route({
            controller: 'EvaluationController',
            templateUrl: 'Projects/Evaluation/templates/evaluation.html',
            controllerUrl: 'app/Controllers/EvaluationController'
        }));
        $routeProvider.when('/evaluate', angularAMD.route({
            controller: 'CriteriaController',
            templateUrl: 'Projects/Evaluation/templates/evaluate.html',
            controllerUrl: 'app/Controllers/CriteriaController'
        }));
        $routeProvider.when("/login", angularAMD.route({
            controller: "loginController",
            templateUrl: "login.html",
            controllerUrl: "app/Controllers/loginController"
        }));
        $routeProvider.when("/summary", angularAMD.route({
            controller: 'SummaryController',
            templateUrl: 'Projects/Evaluation/templates/classes.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/coursesummary", angularAMD.route({
            controller: 'CourseSummaryController',
            templateUrl: 'Projects/Evaluation/templates/coursesummary.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/studentclasses", angularAMD.route({
            controller: 'StudentClasses',
            templateUrl: 'Projects/Evaluation/templates/studentclasses.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/subject", angularAMD.route({
            controller: 'Subject',
            templateUrl: 'Projects/Evaluation/templates/subject.html',
            controllerUrl: 'app/Controllers/SummaryController'
        }));
        $routeProvider.when("/user", angularAMD.route({
            controller: 'UserController',
            templateUrl: 'Projects/Evaluation/templates/user.html',
            controllerUrl: 'app/Controllers/SetupController'
        }));
        $routeProvider.when("/role", angularAMD.route({
            controller: 'RoleController',
            templateUrl: 'Projects/Evaluation/templates/role.html',
            controllerUrl: 'app/Controllers/SetupController'
        }));
        $routeProvider.when("/report", angularAMD.route({
            controller: 'RoleController',
            templateUrl: 'Projects/Evaluation/templates/report.html',
            controllerUrl: 'app/Controllers/SetupController'
        }));

        $routeProvider.otherwise({ redirectTo: '/home' });
    });

    app.run(['authService', function (authService) {
        authService.fillAuthData();
    }]);

    app.config(function ($httpProvider) {
        $httpProvider.interceptors.push(['authInterceptorService']);
    });


    app.config(['$keepaliveProvider', '$idleProvider', function ($keepaliveProvider, $idleProvider) {
        $idleProvider.idleDuration(15 * 60);
        $idleProvider.warningDuration(10);
        $keepaliveProvider.interval(15 * 60);
    }]);

    app.run(['$idle', function ($idle) {
        $idle.watch();
    }]);

    app.run(function ($rootScope, localStorageService) {

        //localStorageService.get('currentModule') === 'undefined')
        if (typeof sessionStorage.getItem('currentModule') === 'undefined') {
            var data = {
                moduleName: 'Dashboard',
                moduleDescription: 'Home'
            };
            sessionStorage.setItem('currentModule', JSON.stringify(data));
            //localStorageService.set('currentModule', data);
        }

        $rootScope.currentModule = JSON.parse(sessionStorage.getItem('currentModule')); //localStorageService.get('currentModule');


    });


    app.directive('a', function () {
        return {
            restrict: 'E',
            link: function (scope, elem, attrs) {
                if (attrs.href === '' || attrs.href === '#') {
                    elem.on('click', function (e) {
                        e.preventDefault();
                    });
                }
            }
        };
    });

    //end of app

    return angularAMD.bootstrap(app);
});
请告诉我哪里错了。。我是requirejs的新手,这是我第一次使用它。我的示例是功能性的。实际上它只包含控制器

这是我得到的样品


非常感谢

为什么要为
authInterceptorService
authService
。。。这些只是您自己的amd模块,因此无需对其进行填充。此外,“角度”需要垫片(导出“角度”)