javascript - 在 Meanjs 中,在 bower.json 中添加新库不会自动添加到配置文件中

标签 javascript bower meanjs

我正在学习 Meanjs。我需要为我的项目添加 Fontawesome。所以我在 bower.json 中添加了一个条目,如下所示:

"dependencies": {
    "bootstrap": "~3",
    "angular": "~1.2",
    "angular-resource": "~1.2",
    "angular-mocks": "~1.2",
    "angular-cookies": "~1.2",
    "angular-animate": "~1.2",
    "angular-touch": "~1.2",
    "angular-sanitize": "~1.2",
    "angular-bootstrap": "~0.11.0",
    "angular-ui-utils": "~0.1.1",
    "angular-ui-router": "~0.2.10",
    "fontawesome": "~4.1.0"
}

然后运行“bower install”。包下载成功,但 fontawesome 没有自动链接到我的页面。我是否必须手动链接这些库?

请帮忙。

最佳答案

您缺少的步骤是在您的 config/env/*.js 文件中添加条目。有一个图书馆部分,您将在其中看到其他图书馆。 config/env 文件决定了添加到 head 标签的链接。

我不知道有什么自动添加这些条目的方法。

关于javascript - 在 Meanjs 中,在 bower.json 中添加新库不会自动添加到配置文件中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25500884/

相关文章:

javascript - 带 react 导航的 DrawerNavigation 标题

Gulp 依赖项在错误的文件夹中查找

javascript - 为什么 Bower 建议忽略缩小的源文件?

javascript - 无法打印controller.js获取的数据

node.js - 用于模式定义的 Mongoose 或 MongoDB?

javascript - 使用javascript将一张透明图像叠加在另一张透明图像上

javascript - 将预制代码从 Codepen 移动到我的 Brackets 元素时,我缺少什么步骤?

javascript - 安装 angular-google-maps 时出现问题

node.js - 全栈 Angular 和meanjs之间的区别

javascript - Handlebars 选择框填充