首页 > 解决方案 > 引导程序未在 chrome 中加载

问题描述

我正在学习 Angular 并正在做一个测试项目,我在其中使用 Bootstrap 版本 3。Bootstrap 导航栏、行、列和其他功能未在 Chrome 中呈现。

我检查了开发工具中的 DOM 结构,它显示 Bootstrap 集成在样式标签中。

来自组件之一的代码:

来自组件之一的代码

标签: angulartwitter-bootstrap

解决方案


似乎您没有在 angular.json 中包含引导程序。

在您的 angular.json 添加以下代码

"styles": [
          "node_modules/bootstrap/dist/css/bootstrap.min.css",
          "src/styles.scss"
        ],

推荐阅读