Answer the question
In order to leave comments, you need to log in
How to properly organize ng-show and ng-hide in Angular?
There is a template
<ul class="menu">
<li class="menuItem" ng-repeat="menuItem in menu">
<a href="{{ menuItem.route }}" ng-click="showSubmenu = !showSubmenu">{{ menuItem.text }}</a>
<ul class="subMenu" ng-show="showSubmenu">
<li class="subMenuItem" ng-repeat="subMenuItem in menuItem.subMenu">
<a href="{{ menuItem.route }}{{ subMenuItem.route }}">{{ subMenuItem.text }}</a>
</li>
</ul>
</li>
</ul>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question