0

I'm using UI-Router to mange my routing on my application.

One item I've hit a snag on it with my menu which is the main view that the controllers will use.

for example I have a home link that should be

index.htm#/home/3

index.htm#/settings/3

3 is the companyId

but it seems that I can't access it that way. Does anyone have a suggestion as to how I could make that work?

1 Answer 1

1

Parent states should not be accessing the parameters of child states, but there is a little bit of magic that ui-router provides that might help. This is ui-sref-active. This directive will add css classes to html elements that have a ui-sref directive and that state is currently active. I think this would be sufficient to solve the problem that you have.

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

1 Comment

Thanks, I'll give it a go, worst case I'll just use server-side to resolve the issue for me.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.