我目前正在使用来自:https ://github.com/ngbp/ngbp 的 ngboilerplate
我想包含来自 UI-Bootstrap 的“ui.bootstrap.datepicker”(Twitter Bootstrap 是用 AngularJS 原生编写的)。问题是这似乎没有包含在最新版本的 ngboilerplate 中。有谁知道我如何将其添加到 ngboilerplate 的样式中。
这意味着其他开发人员可以使用 bower install 将其作为依赖项加载。
我目前正在使用来自:https ://github.com/ngbp/ngbp 的 ngboilerplate
我想包含来自 UI-Bootstrap 的“ui.bootstrap.datepicker”(Twitter Bootstrap 是用 AngularJS 原生编写的)。问题是这似乎没有包含在最新版本的 ngboilerplate 中。有谁知道我如何将其添加到 ngboilerplate 的样式中。
这意味着其他开发人员可以使用 bower install 将其作为依赖项加载。
在尝试了几件事之后,实际上似乎很容易。我只会回答这个问题,以防其他人有同样的问题。
我需要安装新版本的 UI-Bootstrap。这可以通过执行(在 Windows 上)使用 bower 来完成:
凉亭安装角度引导
但这会给你带来很多其他的依赖问题。
为了解决这个问题,我使用了这个 bower.json:
{
"name": "Your-app",
"version": "0.3.1",
"devDependencies": {
"angular": "1.2.4",
"angular-mocks": "1.2.4",
"bootstrap": "3.0.3",
"angular-bootstrap": "0.10.0",
"angular-ui-utils": "0.0.3"
},
"dependencies": {
"angular-ui-router": "0.2.8-bowratic-tedium"
},
"resolutions": {
}
}
我遇到的另一个问题是引导程序的 LESS 代码不是最新的。相反,我只是将 bootstrap.css 包含在我的 main.less 文件中。