【发布时间】:2021-12-04 16:27:13
【问题描述】:
我正在尝试在Angular 项目中使用BootStrap,并且能够使用项目索引文件中的以下内容在前端呈现样式:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
到目前为止还不错,但试图在不引用索引文件 BootStrap with Angular 的情况下按照此链接呈现样式。所以在 angular.json 文件中添加了以下行:
"styles": [
"../node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
]
我相信,这就是以前的链接所做的。我不确定我是否在这里错过了什么?我所做的是以下并且不呈现按钮样式:
<button type="button" class="btn btn-primary">Add</button> //Though the class name doesn't show while writing
【问题讨论】:
标签: angular twitter-bootstrap angular-cli bootstrap-5