I have to display a sub-menu when clicking on a link within the parent dropdown menu, when displaying, the parent should hide and the child show instead
what i have tried :
<ul class="nav navbar-nav navbar-right " >
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" title=""></a>
<ul id="dropdown-menu" class="dropdown-menu" role="menu" ng-hide="showSubMenu">
<li> <a href="#" ng-click="showSubMenu = ! showSubMenu">Hide me and show submenu</a></li>
</ul>
<ul class="dropdown-menu" role="menu" ng-hide="!showSubMenu">
<li><a href="#" ng-click="showSubMenu =!showSubMenu">Hide me and t show back parent</a></li>
</ul>
</li>
</ul>
changing visibility is working, but the drop event is not triggered, i have to click again to toggle the dropdown, i need that to be done automatically after changing the visibility state