Angular4 引入 Bootstrap4

小白踩了好多坑,终于把bootstrap4引入了

1. 版本

-Angular4 npm install -g @angular/[email protected]
-Bootstrap npm install -g [email protected]

2.镜像源:淘宝镜像源

Angular 生成project时,命令行会有推荐使用cnpm下载, 设置之后,新生成项目即通过cnpm下载,但是通过这种方式生成的项目,在angular-cli.json中进行css或者js配置的时候,运行项目会出现不生效的状况

3.配置方式

修改angular-cli.json文件
"../node_modules/[email protected]@bootstrap/dist/css/bootstrap.min.css"

Angular4 引入 Bootstrap4_第1张图片
angular

你可能感兴趣的:(Angular4 引入 Bootstrap4)