Saw*_*ant 7 angularjs bower twitter-bootstrap-3
尝试了Yeoman(1.0.4).生成一个Angular应用程序yo angular; 进入No安装Bootstrap与Sass,因为我想要Bootstrap v 3与LESS.
在脚手架之后,为了获得Bootstrap 3,我输入了:
bower install bootstrap
那将bootstrap安装到bower_components/bootstrap文件夹中.但它没有链接/包含Bootstrap的CSS或JS index.html文件.为什么?
该index.html文件确实有来自bower_components文件夹的Angular js文件:
<!-- build:js scripts/modules.js -->
<script src="bower_components/angular-resource/angular-resource.js"></script>
<script src="bower_components/angular-cookies/angular-cookies.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.js"></script>
<script src="bower_components/angular-route/angular-route.js"></script>
<!-- endbuild -->
Run Code Online (Sandbox Code Playgroud)
但不是bootstrap文件.为什么?我是否必须手动添加/链接到它们?我究竟做错了什么?在为我的应用程序生成脚手架后,如何添加Bootstrap ?
您必须编辑index.html。Yeoman 生成器构建基础 index.html。Bower 只下载依赖项作为包...但仅此而已,它不知道有关您的应用程序的任何其他信息以及您将如何使用它下载的包。您必须自行添加所需的文件。
| 归档时间: |
|
| 查看次数: |
6043 次 |
| 最近记录: |