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

Route params not passed when staying on same page #2644

rderimay opened this Issue Mar 8, 2019 · 2 comments


None yet
2 participants
Copy link

rderimay commented Mar 8, 2019



Reproduction link

Steps to reproduce

When defining routes which do not contain a parameter which is passed in the route params, the component params are updated only when coming from another route. In short, when the route url does not change, nothing is updated.

If you call $router.push({ name:'a', params: { foo: 1 } }) and $router.push({ name:'a', params: { foo: 2 } }) alternatively, the value of foo passed to the component will be updated only if :foo is included in the route url (Example B in Fiddle) or if you force an update by using a random query str (Example C in Fiddle)

What is expected?

I will expect to have foo passed also in the case it is not included in the route url.
At least, having a way to force the update without the trick with the query string would be nice.

What is actually happening?

foo is updated only the first time


This comment has been minimized.

Copy link

posva commented Mar 8, 2019

params must be defined in the route in order to work: /route/:foo

@posva posva closed this Mar 8, 2019


This comment has been minimized.

Copy link

rderimay commented Mar 8, 2019

Yes of course. But.

  1. It works already without being defined in the route, if you come from another route
  2. It would be a nice enhancement and nice way to pass additional parameters you dont want to get reflected in the route ?

@rderimay rderimay changed the title route params not passed when staying on same page Route params not passed when staying on same page Mar 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.