Angularjs 已安装Bower组件,但index.html中缺少该组件

Angularjs 已安装Bower组件,但index.html中缺少该组件,angularjs,bower,lodash,Angularjs,Bower,Lodash,我已使用bower在我的angularjs应用程序中安装了lodash: bower install --save lodash bower.json将相应更新: { "name": "my-app", "version": "0.0.0", "dependencies": { "lodash": "^4.11.2", "angular": "~1.4.0", "json3": "~3.2.4", "jquery": "~1.10.0", "

我已使用bower在我的
angularjs应用程序中安装了
lodash

bower install --save lodash
bower.json将相应更新:

{
  "name": "my-app",
  "version": "0.0.0",
  "dependencies": {
    "lodash": "^4.11.2",
    "angular": "~1.4.0",
    "json3": "~3.2.4",
    "jquery": "~1.10.0",
    "sass-bootstrap": "~3.0.0",
    "es5-shim": "~2.1.0",
    "angular-resource": "~1.4.0",
    "angular-cookies": "~1.4.0",
    "angular-sanitize": "~1.4.0",
    "angular-route": "~1.4.0",
    "angular-ui": "~0.4.0"
  },
  "devDependencies": {
    "angular-mocks": "~1.4.0",
    "angular-scenario": "~1.4.0"
  }
}
一个
lodash
目录被添加到
bower\u components
目录中,我已经运行了
grunt服务器
。但是,lodash的
标记未添加到
index.html

在我的应用程序安装了bower之后,如何将
lodash
添加到我的应用程序中?FWIW,我已经成功安装了其他前端组件,但没有遇到这个问题,所以要么我正在做一些不同的事情,要么我的环境已经改变


我不确定如何调查此问题。

您需要手动执行或使用任务。如果您的应用程序已经配置了wiredep任务,那么只需运行
grunt wiredep

我还有其他前端组件(jquery、angular等),它们在没有wiredep的情况下被注入index.html。为什么现在需要这样做?Yeoman文档也没有提到安装wiredep的必要性。你能在
grunfile.js
中列出在
build
任务中注册的任务吗?拉出在
grunt.registerTask
中注册的任务,它们是
服务器、测试、构建、默认值
。是,我希望关联的任务与
build
任务一起注册。这应该是一个类似于
['clean:dist','useminPrepare']
等的列表
'clean:dist','useminPrepare','concurrent:dist','autoprefixer','concat','ngmin','copy:dist','cdnify','cssmin','uglify','rev'usemin'