我已经使用 Angular cli 安装了 bootstrap 3.4 版。下面是我使用的命令 npm install --save bootstrap@3 然后我添加了
"styles": [
"./node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.css"
],
"scripts": [
"./node_modules/bootstrap/dist/js/bootstrap.min.js"
]
Run Code Online (Sandbox Code Playgroud)
在 angular.json 文件中。但我无法访问引导程序默认样式类。每当我运行应用程序时,浏览器控制台中都不会显示引导文件。
小智 9
添加
@import "~bootstrap/dist/css/bootstrap.css";
Run Code Online (Sandbox Code Playgroud)
到 src/styles 文件。