我已经在HTML文件中添加了以下代码来实现bootstrap下拉菜单,但是我看不到该下拉列表。
HTML文件
<div class="tools text-muted d-flex justify-content-around mr-4">
<div class="pr-3 border-right">Filter</div>
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Filter
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</div>
<fa-icon class="pr-3" [icon]="faChevronDown"></fa-icon>
</div>
<button type="button" class="btn btn-warning">Register</button>
</div>
我也已在angular.json样式数组中添加了引导程序:
"styles": [
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"src/styles.scss"
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js",
"src/assets/js/custom.js"
]
我不愿意在这里看到下拉菜单,我可以看到按钮,但看不到下拉菜单。