-
Notifications
You must be signed in to change notification settings - Fork 21
Vue Composition API: Routing
Mike Lyttle edited this page May 12, 2023
·
2 revisions
redirect(): void {
const path = this.$route.query.redirect
? this.$route.query.redirect.toString()
: "/";
this.$router.push({ path });
}
import { useRoute, useRouter } from "vue-composition-wrapper";
const route = useRoute();
const router = useRouter();
function redirect(): void {
const path = route.query.redirect
? route.query.redirect.toString()
: "/";
router.push({ path });
}
-
After migrating to Vue 3 and Vue Router 4, the "vue-composition-wrapper" package can be removed and
useRoute
anduseRouter
can be imported from "vue-router".import { useRoute, useRouter } from "vue-router";
const route = useRoute(); const router = useRouter();
-
Developer Standard and Processes
-
Workstation Setup
-
IDE Configuration
-
Application Config
-
RedHat SSO Authorization Server
-
Known Issues