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

Accessing Nuxt Router inside Vuex module #33

Open
domi91c opened this issue Aug 15, 2019 · 1 comment
Open

Accessing Nuxt Router inside Vuex module #33

domi91c opened this issue Aug 15, 2019 · 1 comment

Comments

@domi91c
Copy link

domi91c commented Aug 15, 2019

I've been trying out this package in a Nuxt app, and I'm just trying to find a way to change paths with Vue Router inside a Vuex action. Normally that would be with this.$router.push('...'), but I can't access this.$router inside the Vuex module. Can anyone let me know if this is possible?

@mbale
Copy link

mbale commented Aug 16, 2019

You can access the store through this.$store, so you have the context that includes the redirect method

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