繁体   English   中英

grunt构建后angularjs代码不起作用

[英]angularjs code is not working after grunt build

我遇到了这个问题,无法找到解决问题的答案。

我已经用grunt构建系统创建了小的Angularjs代码。

Bower.json http://pastebin.com/8AScfd7d

Gruntfile.js http://pastebin.com/e0d7QLGG

log.txt(咕---force) http://pastebin.com/MYk9iR53

index.html http://pastebin.com/B48w0Z58

使用grunt --force命令进行构建。

当我运行该版本时,它不会在控制台中显示任何错误,并且在netowek选项卡下,所有脚本都可以正常加载,但没有任何反应。 如果我用源脚本替换了缩小的脚本标签(我的自定义代码),它将开始工作。

用尽主意可能是什么问题。

在Gruntfile.js中将ngMin替换为ngAnnotate,并在grunt构建任务中添加了“ ngAnnotate:dist”。

/*ngmin: {
  dist: {
    files: [{
      expand: true,
      cwd: '.tmp/concat/scripts',
      src: '*.js',
      dest: '.tmp/concat/scripts'
    }]
  }
},*/
ngAnnotate: {
            dist: {
                files: [
                    {
                        expand: true,
                        cwd: '.tmp/concat/scripts',
                        src: '*.js',
                        dest: '.tmp/concat/scripts'
                    }
                ]
            }
        }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM