1
votes

My VUE route is removing a hash '#' from the route parameter.

Value that is passed in: /project/test%20#report Parameter value received in Component: 'test '

all characters after the # are removed. *other values/characters are being passed.

Is there a way to get a # passed to the component while the router mode is set to history?

Vue.js route:

Mode has been set to 'history'

{
  path: '/project/:projectId/',
  name: 'project',
  beforeEnter: requireAuth,
  component: Project,
  props: true
},

Component prop declaration:

props: ['projectId'],
1

1 Answers

0
votes

hash is technically NOT part of the path.

you can get the current's url's hash in any component using this.$route.hash.