I have a MEAN project, using AngularJS v1.4.3. I need to insert a dropdown item into the navigation menu, therefore I tried to follow the instructions to install, include and use angular-ui/bootstrap as following:
- install the package with
npm install angular-ui-bootstrap
- add the module to the app
angular.module('usermgmtApp', ['ngRoute', 'ui.bootstrap']);
- use the following code to implement the menu entry for dropdown:
<ul class="nav navbar-nav">
<li><a href="/">Home</a></li>
<li uib-dropdown on-toggle="toggled(open)"><!-- Simple dropdown -->
<a href id="simple-dropdown" uib-dropdown-toggle>
Click me for a dropdown, yo!
</a>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">
<li role="menuitem"><a href="#">Action</a></li>
<li role="menuitem"><a href="#">Another action</a></li>
<li role="menuitem"><a href="#">Something else here</a></li>
<li class="divider"></li>
<li role="menuitem"><a href="#">Separated link</a></li>
</ul>
</li>
<li><a href="applications">Next</a></li>
The code for the dropdown section is a snippet copied from https://angular-ui.github.io/bootstrap/ (including the "href" without target, but as I'm learning Angular I take it as it is). That's all I've done and when I run my application it doesn't even bring-up the landing page so I am missing something here, certainly in installing the module (do I have to download some code in /public, do I have to include some "import" in the code somewhere ...). Again, I am confused with the instructions on the angular github an I appreciate your help. Thanks