Javascript IE 9,10-[$喷油器模块R]

Javascript IE 9,10-[$喷油器模块R],javascript,angularjs,internet-explorer,gruntjs,minify,Javascript,Angularjs,Internet Explorer,Gruntjs,Minify,我在SPA应用程序中使用Angular 1.6.3。我正在使用Grunt构建站点的生产就绪版本 这是我的gruntConfig的一些代码: ngAnnotate: { dist: { files: [{ expand: true, cwd : '.tmp/concat/scripts', src : '*.js', dest : '.tmp/concat/scr

我在SPA应用程序中使用Angular 1.6.3。我正在使用Grunt构建站点的生产就绪版本

这是我的gruntConfig的一些代码:

ngAnnotate: {
  dist: {
     files: [{
              expand: true,
              cwd   : '.tmp/concat/scripts',
              src   : '*.js',
              dest  : '.tmp/concat/scripts'
             }]
         }
}
        ===
    grunt.registerTask('build', [
        'clean:dist',
        'wiredep',
        'useminPrepare',
        'concurrent:dist',
        'autoprefixer',
        'ngtemplates',
        'concat',
        'ngAnnotate',
        'copy:dist',
        'cdnify',
        'cssmin',
        'uglify',
        'filerev',
        'usemin',
        'htmlmin'
      ]);
这是我的index.html文件:

...
<body ng-app="myApp"
      class="ng-cloak">

<ng-include src="'views/navbar.html'"></ng-include>
<ng-view></ng-view>
...

<!-- build:js({.tmp,app}) scripts/scripts.js -->
// file, where I declare angular.module
<script src="app.module.js"></script> 
<script src="app.config.js"></script>
<script src="controllers/main.js"></script>

看起来您正在使用
咕噜咕噜声
缩小代码。你是否声明你的控制器使用安全依赖注入来支持IE中的AngularJS应用程序?@BenBeck你能解释一下如何声明控制器使用安全依赖注入吗?看看这篇文章。它将向您展示如何正确使用依赖项注入和代码缩减:我打赌1.6不支持IE9@charlietfl应用程序在不创建生产版本的情况下工作。在
grunt构建之后
我得到了一个错误。
[$injector:modulerr] Failed to instantiate module myApp due to:
[$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it.