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

Hash mode router-link generated anchor href not a hash url #780

Closed
tilleps opened this issue Oct 14, 2016 · 6 comments
Closed

Hash mode router-link generated anchor href not a hash url #780

tilleps opened this issue Oct 14, 2016 · 6 comments
Assignees

Comments

@tilleps
Copy link

tilleps commented Oct 14, 2016

For "hash" being the default mode, shouldn't the generated anchors generate hashed URLs? (For cases where one would want to copy URL or open link in a new tab/window)

The following router-link:

<router-link to="/example">Example</router-link>

Generates:

<a href="/example">Example</a>

Expected:

<a href="#/example">Example</a>

Clicking on the generated (non-hashed) anchor seems to work, it changes the URL to the hashed version of the URL.

@LinusBorg
Copy link
Member

Should not be too hard, and seems nessessary now that we just added support for "new tab with middle click" again (#758).

@goncha
Copy link

goncha commented Oct 20, 2016

@tilleps use base option as workaround

@LinusBorg LinusBorg self-assigned this Oct 20, 2016
@myst729
Copy link

myst729 commented Oct 20, 2016

Run into this issue too.

The root cause should be here: https://github.com/vuejs/vue-router/blob/dev/src/components/link.js#L33

@marvinroger
Copy link

Why was this closed? The latest version does not contain a fix yet.

@rpkilby
Copy link

rpkilby commented Nov 12, 2016

@marvinroger - this has been fixed on dev (see #809). A release just hasn't been published with the changes yet.

@marvinroger
Copy link

Alright, thanks!

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

No branches or pull requests

7 participants