how to use "router.push " outside vue component in the js class? #14676
Unanswered
nekooee
asked this question in
CLI - PWA mode
Replies: 1 comment 2 replies
-
try this: import { useRouter } from 'vue-router';
const router = useRouter();
router.push({ name: "login" }); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I used the latest version of the quasar framework in CLI mode. (V2.9.2)
my index.js for route code:
and my class in "src/js" folder:
but router.push doesn't work. how to use router push outside vue component?
Beta Was this translation helpful? Give feedback.
All reactions