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

"/" path for a route causes the router link to always have the "router-link-active" class, no matter what other route you're navigating to #8679

Closed
MrCroft opened this Issue May 16, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@MrCroft

MrCroft commented May 16, 2016

Angular 2.0.0-rc.1

Given the following route config in my app component:

@Routes([
    { path: '/', component: HomeComponent },
    { path: '/another-route', component: AnotherComponent }
])

And the following router links in a template:

<a [routerLink]="['/']">Home</a>
<a [routerLink]="['/another-route']">Another Page</a>

The anchor for the home component route will always have the class "router-link-active", not just when you navigate to it.

@ericmartinezr

This comment has been minimized.

Contributor

ericmartinezr commented May 16, 2016

See #8397

@MrCroft

This comment has been minimized.

MrCroft commented May 16, 2016

Thank you @ericmartinezr , I couldn't find that. I'll close this now, as it's a duplicate!

@MrCroft MrCroft closed this May 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment