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 broken #913

Closed
mhartington opened this issue Mar 26, 2014 · 4 comments
Closed

UI-sref active broken #913

mhartington opened this issue Mar 26, 2014 · 4 comments
Assignees
Milestone

Comments

@mhartington
Copy link
Contributor

I have a side menu navigation setup and use UI-routers built in method for handing active links.

<a ng-repeat="pet in pets" class="item" ui-sref="main.detail({petsId: pet.id })" ui-sref-active="active" menu-toggle="left"></a>

This way I can use the built in features of ui-router and not have to do anything on my own. But since 0.9.27, this has been broken.

I saw an issue about active links breaking and that it was closed for 1.0 beta1 but my links are still not being set.

http://codepen.io/mhartington/pen/sybth

@VladimirPal
Copy link

To get around this issue i created my own class current. By checking the code, I found that active class is getting added to active elements and then its getting removed. Why they don't use pseudo-class active?

@adamdbradley
Copy link
Contributor

@Cheguevara We were initially using the :active, but too many issues were uncontrollable on various mobile devices. By manually setting the .activated class ourselves we're able to control which element gets activated, such as link's parent .item class instead of the link itself. You can however still use :active if you'd like.

@fraserxu
Copy link

Got the same issue here. Tried with both active and activated, but not work.

ion-side-menu(side="left")
  ion-content.menu-content
    ion-list
      ion-item(ui-sref-active="active" nav-clear menu-close ui-sref="app.home.start") Home
      ion-item(ui-sref-active="active" nav-clear menu-close ui-sref="app.home.profile") Profile
      ion-item(ui-sref-active="active" nav-clear menu-close ui-sref="app.home.payment") Payment
      ion-item(ui-sref-active="active" nav-clear menu-close ui-sref="app.home.contact") Contact us
      ion-item(ui-sref-active="active" nav-clear menu-close ui-sref="app.home.invite_list") Invite friends

Anyone has solution for this? Thanks.

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants