I am having a hard time trying to redirect in method after a store action i.e. redirect to profile upon login, redirect to '/' upon logout.
I have tried the this.$router.go after awaiting the store dispatch, but no matter the route, it just renders the page.
Is there something I am doing wrong, or is this an enhancement that could be implemented?
P.S. I should say this is a framework, combined with express is actually making me happy to develop web applications again and I look forward to production ready release.
Hi @mattdharmon, I'm using this.$nuxt.$router.replace({ path: '/profile })
and it works fine.
You also can use another of the vue router 2 instance methods:
https://router.vuejs.org/en/essentials/navigation.html
Already answered here
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
Hi @mattdharmon, I'm using
this.$nuxt.$router.replace({ path: '/profile })
and it works fine.You also can use another of the vue router 2 instance methods:
https://router.vuejs.org/en/essentials/navigation.html