I am looking to implement a bootstrap dropdown in Angular.
I have added the bootstrap dependency, and the dropdowns appear but nothing happens when I click them.
<div class="dropdown">
<button class="btn btn-secondary dropdown-toggle" type="button" id="dropdownMenuSex" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Sex
</button>
<div class="dropdown-menu" aria-labelledby="dropdownMenuSex">
<a class="dropdown-item" href="#">Female</a>
<a class="dropdown-item" href="#">Male</a>
</div>
</div>
What have I missed? Stackblitz here.
In your stackblitz you use Bootstrap v5, but your code looks like for v4.
v5 version dropdown example from docs (https://getbootstrap.com/docs/5.3/components/dropdowns/#overview) uses
data-bs-toggle
attributte: