All Questions
9 questions
1
vote
1
answer
232
views
Accessing Router from Inside Setup Call (Mixing Composition/Options APIs)
We're in the middle of migrating our Vue 2 application to Vue 3, and as such we have the Options API and Composition API living side by side. Most of the composition API is working fine. However...
I'...
0
votes
1
answer
1k
views
Lazy loading & loading states with vue-router, vite & vuejs 2.x
I'm migrating an old project from vue-cli to vite. I followed the migration guide and everything worked great, but there's something it's not working, or at least, not as intended, when I was using ...
1
vote
1
answer
550
views
vuejs loading component dynamically depending on route component
I'm a newbie to Vuejs and I'm wondering how I can load the component to App.vue depending on the route visited.
In my router -> index.js I have:
import { createRouter, createWebHistory} from 'vue-...
1
vote
0
answers
149
views
Named views with children in Vue?
I have a single page with multiple <router-view/> shown at the same time using named views.
That works well, however I need to also add children to each view but can't figure out how to do that.
...
0
votes
2
answers
1k
views
How to fire an event in mount in Vuejs
I have a sidebar that you can see below:
<template>
<section>
<div class="sidebar">
<router-link v-for="(element, index) in ...
3
votes
1
answer
5k
views
VueJS 3 routing with vue-router and CDN
For the past three hours or so, I have been trying to convert a VueJS 2 + vue-router + CDN project to VueJS 3. I haven't been able to make it work so far. The VueJS 2 version works just fine. The ...
0
votes
1
answer
557
views
Change route view based on route name
At the moment I am displaying google maps in a div, whenever I change route, I want to replace the view with another view. I tried to set it as below, but it doesn't work
.map-col(ref="mapCol&...
3
votes
2
answers
4k
views
warning in vue-router 3.5.1: <router-link>'s tag prop is deprecated and has been removed in Vue Router 4
Since I updated our Vue.js app's node packages, I get the following warning in the browser console:
[vue-router] 's tag prop is deprecated and has been
removed in Vue Router 4. Use the v-slot API to ...
0
votes
1
answer
1k
views
How to redirect on other route if condition is true in in router.js vuejs
I have multi auth application in vuejs . So, in router.js i checked that if customer is logged in it should redirect to customer dashboard and if admin is logged in it should redirect to admin ...