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

Cannot switch between aliased paths #613

Closed
radek-altof opened this issue Nov 23, 2020 · 4 comments
Closed

Cannot switch between aliased paths #613

radek-altof opened this issue Nov 23, 2020 · 4 comments

Comments

@radek-altof
Copy link

Version

4.0.0-rc.5

Reproduction link

https://codesandbox.io/s/vue-router-4-reproduction-forked-qxzts

Steps to reproduce

Have a look at router aliases and try clicking through navigation.

What is expected?

  1. You should be able to navigate between aliased paths, even when they resolve to the current route object (so that the path changes).

  2. <router-link> should have router-link-exact-active class only when the path matches exactly.

What is actually happening?

  1. You can't navigate between aliased paths that resolve to the current route object.

  2. <router-link> has router-link-exact-active class when an entire route object matches (because of alias).

@posva
Copy link
Member

posva commented Nov 23, 2020

This is expected: vuejs/rfcs#136
Not treating the navigation as duplicated would be inconsistent and confusing with the active behavior

@posva posva closed this as completed Nov 23, 2020
@radek-altof
Copy link
Author

Ah crap, I'll need to work around then. I was relying on this behavior when using Vue Router 3. Thanks for pointing to the RFC.

radek-altof added a commit to adbrosaci/vue-lang-router that referenced this issue Nov 26, 2020
@a0s
Copy link

a0s commented Jun 5, 2024

@radek-altof Did you find the solution? I need to navigate between aliases like /es/page and /nl/page with switching language in beforeEach

@radek-altof
Copy link
Author

@a0s To be perfectly honest, I don't remember at all, it's been a very long time 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants