Level 60
Is this what you are looking for? https://router.vuejs.org/guide/advanced/navigation-guards.html#global-before-guards
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Is it possible to have 1 routing file in Vue which handles conditional routing as per the below pseudocode?
if ( loggedInUser == userTypeA) {
All routing Logic for userTypeA goes here
} else if ( loggedInUser == userTypeB) {
All routing Logic for userTypeB goes here
}
Please or to participate in this conversation.