How can I use router in store #11803
Answered
by
metalsadman
knut9900848
asked this question in
CLI - PWA mode
-
|
I'm trying to redirect to dashboard after login.
So I codede that in my login method of auth.js file like below.
But there is nothing to happen. How can I use router in vuex store file? |
Beta Was this translation helpful? Give feedback.
Answered by
metalsadman
Dec 28, 2021
Replies: 1 comment
-
|
use // some actions.js
export function login(...) {
...
this.$store.push(...)
...
}see other methods here https://forum.quasar-framework.org/topic/3960/access-router-outside-vue/9. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
metalsadman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
use
functionon your store actions, then you can access it viathis.ie.
see other methods here https://forum.quasar-framework.org/topic/3960/access-router-outside-vue/9.