I am trying to create a bootstrap nav with a dropdown as below:
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">BRAND</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="#">Home</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li role="separator" class="divider"></li>
<li class="dropdown-header">Nav header</li>
<li><a href="#">Separated link</a></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Logout</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
The above code works fine in a standalone html page, but when running with angular and ng2-bootstrap, the dropdown does not work and the collapsed responsive menu does not open the dropdown either.
I am a little confused regarding the proper steps to integrate ng2-bootstrap. I have the following:
<script src=".../ng2-bootstrap.min.js"></script>in index.html<link href=".../bootstrap.min.css" rel="stylesheet"> in index.htmlDo I need to also include references to bootstrap.js and jquery.js as I need to with a standalone html page? I have tried, but it does not change the situation.
This is a known feature request: #540 and #188
This is a pretty substantial limitation. I would think that adding support for navbar and the collapsed responsive navbar should be very high on the priority list.
Did this ever get implemented?
Most helpful comment
This is a pretty substantial limitation. I would think that adding support for navbar and the collapsed responsive navbar should be very high on the priority list.