【发布时间】:2021-08-06 03:50:39
【问题描述】:
我正在使用 Angular 12 构建网站,我认为这不相关,但我正在使用 sccs。 我在使用引导模块时遇到问题,例如下拉、模式和工具提示,它们基本上是我最需要的组件。 我使用“npm install bootstrap”安装了引导模块。 我的脚本数组是这样配置的:
"scripts": [
"node_modules/jquery/dist/jquery.slim.min.js",
"node_modules/bootstrap/dist/js/bootstrap.bundle.min.js" ]
我尝试使用的下拉列表代码是: https://getbootstrap.com/docs/5.1/components/dropdowns/
<div class="btn-group">
<button type="button" class="btn btn-danger dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false">
Action
</button>
<ul class="dropdown-menu">
<li><a class="dropdown-item" href="#">Action</a></li>
<li><a class="dropdown-item" href="#">Another action</a></li>
<li><a class="dropdown-item" href="#">Something else here</a></li>
<li><hr class="dropdown-divider"></li>
<li><a class="dropdown-item" href="#">Separated link</a></li>
</ul>
</div>
你能帮帮我吗?
【问题讨论】:
-
按钮是否像在 Bootstrap 中一样?
-
是的,它看起来像在引导程序中,但点击时没有任何反应
标签: html angular bootstrap-5