Skip to content

this.$router.go without specified name or path #437

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

Closed
simplesmiler opened this issue Mar 30, 2016 · 5 comments
Closed

this.$router.go without specified name or path #437

simplesmiler opened this issue Mar 30, 2016 · 5 comments

Comments

@simplesmiler
Copy link
Member

It would be useful to have this.$router.go({ ... }) and v-link="{ ... }" assume the current state to be the target if name or path are not specified, thus updating params and query string on the current state and triggering data hook.

This can be achieved with this.$router.go({ name: this.$route.name, ... }) and v-link="{ name: $route.name, ... }", but only for named states.

@azamat-sharapov
Copy link

triggering data hook
This can be achieved with this.$router.go({ name: this.$route.name })

I doubt it works.. I'm waiting for #296 for this.

@simplesmiler
Copy link
Member Author

@azamat-sharapov it works when params or query do change, which is what I'm after 😉
I've edited the details in.

@azamat-sharapov
Copy link

Well.. that isn't ideal in some cases, because leaves history dirty. Let's see what Evan thinks about #442

@simplesmiler
Copy link
Member Author

What I'm trying to say is that this feature request (default to current state when none specified) is orthogonal to the #296 (option to force reload the current state).

Regarding the dirty history, this can already be solved with replace: true.

@simplesmiler
Copy link
Member Author

Closed in favor of #461 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants