angular6 中使用bootstrap


npm install jquery   --save

npm install popper.js   --save

npm install bootstrap   --save

 

 

然后在node_modules文件夹中可以找到你安装的文件

接下来开始修改配置文件

 

在angular.json 文件中添加它们

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

 保存后重启服务

  测试一下:在页面中使用bootstrap测试一下

 

okok 完全没有问题了

(给你一个按钮去试试吧)

<button type="button" class="btn btn-success">hello</button>


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM