angular-cli bootstrap4 使用模态框时,遇到了这2个问题
- 模态框 不显示
- 模态框显示后不在最上层
模态框 不显示的问题
这个是纠结最久的问题,明明和官方文档例子一样但是就是不出来
用f12 选择看到模块都在,只是没有显示出来,然后去官方文档又仔仔细细的看了一遍发现少加了一个样式
Let ngx-bootstrap know you are using BS4
Open /src/index.html and add the following markup:
<body>
<!-- Enable bootstrap 4 theme -->
<script>window.__theme = 'bs4';</script>
<app-root>