-
Notifications
You must be signed in to change notification settings - Fork 3k
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, abstract states and ui-sref-active #2954
Comments
interesting timing... I just implemented your feature request in the Angular 2 codebase for the In ng1, your options are to use the new |
Found my mistake, you have to place * for each level: It would be good if there is a possibility to annotate different levels with * or other sign. |
use |
Thanks for your fast reply. I am not sure, but I think it wasn't covered in the doc. |
Youre right, the docs for glob syntax are very very poor. |
Docs for glob are improved now 👍 https://ui-router.github.io/ng1/docs/latest/classes/core.glob.html |
Can globs be applied to match multiple unrelated states? I want an "active" link if any child state matches from 2 different parent root states. Ex: |
+1 I also need to be able to match on multiple unrelated child states... can this be done? |
I am still having an issue with this. I've used your solution and it works great. However, when I try to do something like this: ui-sref-active="{'active' : '{{$ctrl.section.routeParent}}.**'}" it doesn't work. $ctrl.section.routeParent is resolving correctly, I've checked the source. When I type it in manually, it works. The element looks exactly the same in the source after using both methods. |
For anyone who runs into what @Cptcecil ran into: move the logic to discern what the active route should be to your controller like so:
And then your html should use |
I am using an abstract state to define an URL hierarchy. The abstract state is used as parent of a drop-down menu and should route to some child page. Using ui-router 0.3.1.
My menu:
When I click on the administration entry, it shows me Error: Cannot transition to abstract state 'administration' and change to administration.user.list.
I can fix it with removing
ui-sref="administration"
for the first li, but then there is no hightlighting for the root entry anymore if I select groups.Is there any way to use abstract states to highlight nav entries?
The text was updated successfully, but these errors were encountered: