Closed joakimglaving closed 7 years ago
This works: http://jsfiddle.net/3ewnh7hd/
I tried it in my local environment now, but it doesn't seem to include the hash
in the url though, and the accordion does not open. Do I have to do something more with the hash
to make it work?
Regards,
My mistake! What @LinusBorg wrote works perfectly fine :)
Can close this.
Version
2.7.0
Reproduction link
http://jsfiddle.net/xt02xun7/
Steps to reproduce
/foo
link.What is expected?
It redirects to
/redir
, with the hashtag still in the url.What is actually happening?
It can't find
/redir#bar
I have a page which opens accordions by using hashtags, and I would like to include these hashtags in the vue routers redirect function like so:
{ path: '/foo', redirect: '/redir#bar' }
.Manually typing the url
/redir#bar
works.It seems like the redirect tries to find the path
/redir#bar
, including the hashtag. What I would like to do is for it to redirect to the/redir
path, with the hashtag#bar
still in the URL, as if you would write the URL manually.Is this possible?
Regards,