You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With vue-router set in abstract mode, when the main App is created, call console.log(this.$route.query) and console.log(this.$route.fullPath), either before or after router.replace('/').
What is expected?
this.$route.query should be an object with the GET values
this.$route.fullPath should display the full route path in the URL
What is actually happening?
regardless of what you write in the URL
this.$route.query is an empty object
this.$route.fullPath is always '/'
If you set vue-router in history mode, this.$route.query and fullPath provide the expected value (of course before router.replace('/')).
The text was updated successfully, but these errors were encountered:
In abstract mode, when you start the router you are in a nowhere place. It's meant to work in any environment like node without a URL, so it doesn't take into account the current window.location like other histories do
Hi @posva, this seams in contrast with what @yyx990803 and @Samuell1 wrote in #729. They said that the router starts in a nowhere place, but also that you should manually call router.replace to give a change of rendering a non-route URL. If you cannot read the URL, how can you render a non-route URL? And how can you pass any URL parameter, path, or whatever in the abstract mode? I think that the abstract mode should be able to read query and fullPath BEFORE you call router.replace, so that you will have the chance to manually force a non-route node with replace.
Version
3.0.2
Reproduction link
https://codesandbox.io/embed/vue-template-0vm7k
Steps to reproduce
With vue-router set in abstract mode, when the main App is created, call console.log(this.$route.query) and console.log(this.$route.fullPath), either before or after router.replace('/').
What is expected?
this.$route.query should be an object with the GET values
this.$route.fullPath should display the full route path in the URL
What is actually happening?
regardless of what you write in the URL
this.$route.query is an empty object
this.$route.fullPath is always '/'
If you set vue-router in history mode, this.$route.query and fullPath provide the expected value (of course before router.replace('/')).
The text was updated successfully, but these errors were encountered: