angular - 引导程序未在 chrome 中加载
问题描述
我正在学习 Angular 并正在做一个测试项目,我在其中使用 Bootstrap 版本 3。Bootstrap 导航栏、行、列和其他功能未在 Chrome 中呈现。
我检查了开发工具中的 DOM 结构,它显示 Bootstrap 集成在样式标签中。
来自组件之一的代码:
解决方案
似乎您没有在 angular.json 中包含引导程序。
在您的 angular.json 添加以下代码
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.scss"
],
推荐阅读
- docker - 来自 docker-compose 的顶级属性“network_mode”无效
- python - python ValueError:形状(389,1)的不可广播输出操作数与广播形状(389,7)不匹配
- node.js - 如何使用 Spotify API 上传自定义播放列表封面图片
- laravel - 如何从集合 laravel 中检索值
- r - 使用 (ref:foo) 格式化 bookdown 定理环境标题(例如,示例)
- php - 检查 isset 的特定值
- c++ - 具有原始类型的 C++ 并发队列
- ios - List 对象的 SwiftUI 分页
- angular - Angular 8:错误错误:未捕获(承诺中):TypeError:您提供了一个无效的对象,其中预期有流
- linux - 将循环索引(增量)的值分配给bash中的变量