I am currently working with bootstrap and AngularJS to create a sidebar menu. Here is the code I have for it:
<ul class="nav navbar-nav">
<li><a href="#"><span class="glyphicon glyphicon-send"></span> Link</a></li>
<li class="active"><a href="#"><span class="glyphicon glyphicon-plane"></span> Active Link</a></li>
<li><a href="#"><span class="glyphicon glyphicon-cloud"></span> Link</a></li>
<!-- Dropdown-->
<li class="panel panel-default" id="dropdown">
<a data-toggle="collapse" href="#dropdown-lvl1">
<span class="glyphicon glyphicon-user"></span> Sub Level <span class="caret"></span>
</a>
<!-- Dropdown level 1 -->
<div id="dropdown-lvl1" class="panel-collapse collapse">
<div class="panel-body">
<ul class="nav navbar-nav">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<!-- Dropdown level 2 -->
<li class="panel panel-default" id="dropdown">
<a data-toggle="collapse" href="#dropdown-lvl2">
<span class="glyphicon glyphicon-off"></span> Sub Level <span class="caret"></span>
</a>
<div id="dropdown-lvl2" class="panel-collapse collapse">
<div class="panel-body">
<ul class="nav navbar-nav">
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
</ul>
</div>
</div>
</li>
</ul>
</div>
</div>
</li>
<li><a href="#"><span class="glyphicon glyphicon-signal"></span> Link</a></li>
</ul>
However, I am encountering an issue where clicking on the sub level menu redirects me to localhost/#dropdown-lvl1 instead of showing the div dropdown-lvl1. Do you have any insights on why this behavior is occurring?