I'm using Angularjs and Bootstrap 2.3.2 to create a menu system with submenus. This works great until I'm using the responsive design on narrow devices and the collapsed version of the menu system has a problem. Specifically the menu does not collapse after selecting one of the menu items. Interestingly the SUB menus collapse even when the main does not. The menu CAN be collapsed if you click on the icon-bar thing, but the menu items themselves will not do this.
I retrieve the menus ( which are user specific) via $resource and they are created by the following template:
<div class="navbar navbar-inverse navbar-fixed-top hidden-print">
<div class="navbar-inner">
<div class="container">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
</button>
<a class="brand" href="#">BRAND HERE</a>
<div ng-controller="MenuController" class="nav-collapse collapse">
<div ng-repeat="menu in menus">
<ul class="nav" role="navigation">
<li ng-show="menu.submenus" class="dropdown" class="active">
<a class="dropdown-toggle" href="{{menu.route}}">{{menu.title}}<i class="icon-caret-down"></i><b class="caret"></b></a>
<ul class="dropdown-menu">
<li ng-repeat="submenu in menu.submenus"><a href="{{submenu.route}}">{{submenu.title}}</a></li>
</ul>
</li>
<li ng-hide="menu.submenus"><a href="{{menu.route}}">{{menu.title}}</a></li>
</ul>
</div>
</div>
<!--/.nav-collapse -->
</div>
<!--/ container -->
</div>
</div>
<!--/ navbar -->
The menus object looks something like this:
[
{
"title": "Setup",
"route": "#",
"submenus": [
{
"title": "one",
"route": "#/one",
"submenus": null
},
{
"title": "two",
"route": "#/two",
"submenus": null
} ]
},
{
"title": "special",
"route": "#/special",
"submenus": null
},
{
"title": "boring",
"route": "#/boring",
"submenus": null
}
]