Angular CLI --添加bootstrap

前端之家收集整理的这篇文章主要介绍了Angular CLI --添加bootstrap前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、首先下载bootstrap组件

npm install jquery --save
npm install popper.js --save
npm install bootstrap@next --save

2、修改配置文件

"scripts": [
  "../node_modules/jquery/dist/jquery.slim.js","../node_modules/popper.js/dist/umd/popper.js","../node_modules/bootstrap/dist/js/bootstrap.js"
],"styles": [
  "../node_modules/bootstrap/dist/css/bootstrap.css","styles.css"
],

3、重启server(调了半天一直没生效就是因为当修改了angular-cli.json时需要重启server)

原文链接:https://www.f2er.com/angularjs/145705.html

猜你在找的Angularjs相关文章