Angular grunt build (from yeoman) breaks my app

后端 未结 5 1964
野趣味
野趣味 2021-01-12 09:33

after running the build from the /dist folder I get:

Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.2.1/$injector/modulerr?p         


        
5条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-12 10:04

    Is everything working if you only serve the files (grunt server)? So: No problem with angular this way?

    Have your read the linked error page? http://docs.angularjs.org/error/$injector:modulerr?p0=ourname&p1=Error:%E2%80%A6(http:%2F%2Flocalhost:8085%2Flib%2Fangular%2Fangular.min.js:32:462)

    It tells you, that there is a problem with our "ourname" module.

    Do you have some code for us?

    I am not quite sure, what this changes, but you can also define it like:

    useminPrepare: {
                html: '<%= yeoman.app %>/index.html',
                options: {
                    dest: '<%= yeoman.dist %>',
                    flow: {
                        steps: {'js': ['concat','ngmin']},
                        post: {}
                    }
                }
            },
    

    https://github.com/yeoman/grunt-usemin#flow Did you missed the "flow"?

    Maybe one of the questions helps to find the solution ;)

提交回复
热议问题