-
Notifications
You must be signed in to change notification settings - Fork 13
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
Proper work of "ui-sref-active" #1
Comments
Give it a try
|
thanks! |
Yes, indeed it makes some sense. You get right what I mean by styling. When you click to images({id:null}) and you are in images state, this link is not highlighted. But if you use link without "({id:null})", this styling works properly. Perhaps there is a solution to keep both properties. |
I did do a minor amount of reading and it appears to be an old issue (angular-ui/ui-router#704) that there are solutions for. I will keep this report open and address it after the end of the course -- to keep things consistent. |
I figured out how to solve this. |
Awesome! Just tried it. |
Closing issue -- fix added to module#7, lesson 1 baseline thanks |
/app/assets/javascripts/spa-demo/layout/navbar/navbar.html
Perhaps the following
<ul class="dropdown-menu"> <li ui-sref-active="active"> <a ui-sref="authn">Authentication Check</a></li> <li ui-sref-active="active"> <a ui-sref="images({id:null})">Images</a></li> <li ui-sref-active="active"> <a ui-sref="tags({id:null})">Tags</a></li> <li ui-sref-active="active"> <a ui-sref="things({id:null})">Things</a></li> </ul>
Should be fixed as this:
<ul class="dropdown-menu"> <li ui-sref-active="active"> <a ui-sref="authn">Authentication Check</a></li> <li ui-sref-active="active"> <a ui-sref="images">Images</a></li> <li ui-sref-active="active"> <a ui-sref="tags">Tags</a></li> <li ui-sref-active="active"> <a ui-sref="things">Things</a></li> </ul>
In your example "ui-sref-active" works properly only for the first link, but not for the others. It seems "({id:null})" makes not much sense, but removing it makes styling working properly.
Thanks.
The text was updated successfully, but these errors were encountered: