1

I use AngularJS ui-router and I have the problem that I habe a submenu which i reachable from menu1 and menu2. Is it possible anywhere to highlight either Menu1 or Menu2?

Menu1: ng-class="{'active': vm.state.includes('auth.Menu1') || vm.state.includes('auth.SubMenu')}"
Menu2: ng-class="{'active': vm.state.includes('auth.Menu2') || vm.state.includes('auth.SubMenu')}"
3

1 Answer 1

1

People keep asking this question, you should use ui-sref-active directive

Sign up to request clarification or add additional context in comments.

4 Comments

Find the dup and flag as dupe! :-D
I have removed ui-sref-active because I don't know how to implement it with this directive.
Your menu item is just a li/a etc tag with ui-sref directive and the path. Just put ui-sref-active on both.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.