Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui-sref-active how to make parent and child remain selected? #920

Closed
mysoko opened this issue Mar 2, 2014 · 1 comment
Closed

ui-sref-active how to make parent and child remain selected? #920

mysoko opened this issue Mar 2, 2014 · 1 comment

Comments

@mysoko
Copy link

mysoko commented Mar 2, 2014

code:
1.index.html

<li ui-sref-active="active"> <a ui-sref="home"> Home </ a> </ li> 
<li ui-sref-active="active" ng-class="{active: $state.includes('configure')}"> <a ui-sref="configure"> Configure </ a> </ li> 
<div ui-view> </ div> <-! see configure.xml -> 

2.configure.html

<li ui-sref-active="active"> <a ui-sref="configure.user"> User </ a> </ li> 

3.app.js

angular.module ('...'). run (['$ rootScope', '$ state', '$ stateParams', function ($ rootScope, $ state, $ stateParams) {
    $ rootScope $ state = $ state; 
    $ rootScope $ stateParams = $ stateParams; 
             }]) 

First, I refreshed when parent and child menus are selected (class = "active")

But I re-click the Home-> Configure-> User index.html page after the parent menu Configure.class = "" is not a class = "active"

configure.html page child menu configure.user.class = "active"

ui-sref-active how to make parent and child remain selected?

@timkindberg
Copy link
Contributor

Duplicate #819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants