Closed
Description
When passing a hash
value as a property in a Location Object in the to
attribute of a router-link
, there is no hash in the generated url when vue-router is in history mode.
Version
3.0.6
Reproduction link
https://codesandbox.io/s/vuedynamiccomponents-4hdqp
The Home link shows the issue
<router-link :to="{ name: 'Home', hash: 'test' }">Home</router-link>
creates the url /test
instead of /#test
Steps to reproduce
- Setup app with routes
- Create a link with
router-link
using an Object with a hash value for the:to
attribute - Run app and try clicking on link
What is expected?
Link should be produced with a hash separating the hash, eg /link/to/route#hash
What is actually happening?
No hash separating hash, eg /link/to/routehash
Metadata
Metadata
Assignees
Labels
No labels