-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
RouterLinkActive doesn't work properly with children routes #13075
Comments
I have exactly the same issue (only difference is that I have |
@mrVito can you add a small plunkr that demonstrates the issue? |
@DzmitryShylovich I'm having the same behaviour as @Qszer94 have mentioned.
and
When I'm at 'Child1', it's ok, but when I click on 'Child2', both links are active. I've tried |
me face this issue how to fix |
I'm sorry but reported issues require a reproduction of the issue. We suggest using StackBlitz, Plunker or Github. If this issue persists, please create a reproduction using one of the links above. Describe the difference between the expected and current behavior in a new issue with the reproduction linked. The reproduction provided is very large. Not targeted to this issue. If this is still a problem, please create a small reproduction focused specifically on this issue. |
@jasonaden I just created a reproduction of the issue: http://plnkr.co/edit/SRGNtSklC8Id0zIrPLXB?p=preview Steps to reproduce: Thanks |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
[ x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see
Current behavior
Look at this Plunker.
When you choose one of four heroes HeroComponent is loaded. Inside its templete there is another
<router-outlet>
where you can navigate beetween HeroDetailComponent and HeroNameComponent components. HeroDetailComponent is loaded by default as it haspath: ''
in routing configuration but link 'Details" isn't mark as active.When we navigate to 'Name' and then back to details by clicking 'Details' link - active class starts to be added.
Also when we are in HeroNameComponent and then we choose again active hero from list (only curently active hero) then details button is shown as acivated correctly .
Its seems to doesn't work especially when component is reused, without creating new instance.
Expected behavior
When clicking one of heroses, details button should be marked as active.
Angular version: 2.2.3, also ~2.1.0
Browser: [all ]
Language: [TypeScript]
The text was updated successfully, but these errors were encountered: