小编use*_*708的帖子

angular.js with require.js得到未捕获错误:[$ injector:modulerr]

我试图使用require.js与Main.js并获得以下错误:

未捕获错误:[$ injector:modulerr] http://errors.angularjs.org/1.2.0rc1/ $ injector/modulerr?p0 = MyApp&p1 =错误%3 ... 3A8080%2FResults%2Fresources%2Fjs%2Fvendor%2Fangular.min. JS%3A31%3A252)

我的Main.js

 require.config({

    // alias libraries paths
    paths: {
        'angular': 'vendor/angular.min',
        'jquery': 'vendor/jquery-1.8.0-min',
        'angularroute': 'vendor/angular-route'          
    },

    // angular does not support AMD out of the box, put it in a shim
    shim: {
        'angular': {
            deps: ['jquery'],
            exports: 'angular'
        },
        'angularroute':{
            deps:['angular']
        }

    }
});
require([
         'angular',
         'angularroute',
         'app'
         ],
        function(angular, angularroute, app){
    'use strict';       
})
Run Code Online (Sandbox Code Playgroud)

我的app.js.

define(['angular'], function(angular){
    return angular.module('MyApp',['ngRoute']);
});
Run Code Online (Sandbox Code Playgroud)

我收到一个错误,说我需要将angularroute添加到我的应用程序,但我仍然收到此错误.谁能指出我可能做错了什么?

angularjs

11
推荐指数
3
解决办法
1万
查看次数

Spring mvc throw org.springframework.web.HttpMediaTypeNotAcceptableException:找不到可接受的表示

我正在使用springMVC,并且在尝试进行更新时遇到异常.

10:10:49,847 DEBUG LogicalConnectionImpl:250 - Released JDBC connection
10:10:49,859 DEBUG FixedContentNegotiationStrategy:48 - Requested media types is text/html (based on     default MediaType)
10:10:49,929 DEBUG ExceptionHandlerExceptionResolver:132 - Resolving exception from handler [public   com.model.JobQueue com.controller.TestResultController.updateJob(java.lang.String,java.lang.String,java.lang.String)]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
10:10:49,937 DEBUG ResponseStatusExceptionResolver:132 - Resolving exception from handler [public com.model.JobQueue com.controller.TestResultController.updateJob(java.lang.String,java.lang.String,java.lang.String)]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
10:10:49,938 DEBUG DefaultHandlerExceptionResolver:132 - Resolving exception from handler [public com.model.JobQueue com.controller.TestResultController.updateJob(java.lang.String,java.lang.String,java.lang.String)]: org.springframework.web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
10:10:49,940 DEBUG DispatcherServlet:999 - Null ModelAndView returned to …
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc

8
推荐指数
1
解决办法
2万
查看次数

标签 统计

angularjs ×1

java ×1

spring ×1

spring-mvc ×1