Questions tagged [vue-router]
Vue Router is a routing library for single-page applications designed for use with the Vue.js framework.
vue-router
6,217
questions
0
votes
0
answers
5
views
Passing an object to a route with vue-router
Based on this from vue-routers site it seems as though you can pass an object as a prop. However, everytime I try to do this it seems to it fail saying invalid param
My route is defined as follows:
...
0
votes
0
answers
9
views
How can I using common routes for multi-projects
I am using NuxtJs 3 and I have 3 folders containing 3 different nuxtjs projects in which the "packages" folder contains 2 subfolders "cms" and "monitor". When I run the ...
-1
votes
1
answer
42
views
Vuejs guard router failed with infinite loop
Hellop, I have a vue3 app consume laravel 11 api,
I want to develop a router guard to redirect unauthenticated users to the login page. When the Laravel server is not running, the code works and ...
0
votes
1
answer
30
views
how to validate Form and Go to Next Page with vue Router
a form after validate must go to next author page with vue-Router using this code but not validate
<form @submit.prevent="validate">
<div class="row">
...
1
vote
2
answers
33
views
Route params are not rendering inside Vue components when using Vue Router
I've got Vue router running with these routes:
const routes = [
{
path: '/',
name: 'home',
params: {
label: 'Home page'
},
component: Home
},
{
path: '/group1',
...
0
votes
0
answers
26
views
What causes Cannot find module '~/pages/index.vue' or its corresponding type declarations. ts(2307) error while using router.options.ts?
see sample image here
I have a nuxt 3 project and I would like to use custom routing with it. I followed nuxt documentation on custom routing and added a folder named 'app' and inside I created router....
0
votes
1
answer
38
views
Navi link list doesn't print path (vue)
I have setup a router link list in Vue:
const router = createRouter({
history: createWebHistory(import.meta.env.VITE_BASE_URL),
linkActiveClass: 'activeView',
routes: [
{
path: '/',
...
0
votes
1
answer
36
views
web.config failed to rewrite index.html when a baseURL is added to sub directory in Vue 3 app with Vite
Currently working on a Vue 3 app which deployed using Azure web apps. When I deployed it to the root and used web.config it worked fine, But I need to add a Base URL. For that, I have added the ...
0
votes
1
answer
26
views
What is the best way to generate menu titles with vue router?
I have the following routes defined in vue router:
const routes = [
{
path: '/',
name: 'home',
params: { label: 'Home' },
component: Home
},
{
path: '/path1',
name: '...
1
vote
1
answer
27
views
beforeEnter navigation guard not triggering when router.push() is called on the same route
I have a search engine which is not properly updating when after having searched something, I try to search something else.
When I want to search something, the search function in the search component ...
0
votes
0
answers
42
views
How to implement a multi-document application based on dialog (modal) windows in VUE?
Now I have a classic SPA application implemented using the VUE, VUE Router, VUEX, Vuetify stack.
Recently I saw an implementation of an interface based on editing data in dialog (modal) windows. As a ...
0
votes
0
answers
39
views
How can I configure routes in a Vue.js application to handle query parameters?
What configurations are required in my routes to handle the query parameter userActivity for a URL like https://somesite.com/feedpool?userActivity=false?
I'm using Vite as a build tool, with the base ...
0
votes
0
answers
27
views
Vue - Is there a way for a route to have the same path, but different name (at least for test purpose only)?
I have the following vue-router definition in my vue app:
export const routes = [
{
path: '/test/:id',
name: 'test',
component: () => import('@/components/MyComponent.vue')
}
]
And ...
0
votes
0
answers
17
views
Vue.js Vuex State Not Syncing Across Tabs and Direct URL Access
I have a Vue.js application with a login component and a settings page. When I log in and navigate to the settings page via the menu within the login page, the Vuex store updates correctly, and I can ...
2
votes
1
answer
72
views
[Vue warn]: Failed to resolve component: UserBasket
I ran into an issue that had me scratch my head for a few days now. I am doing a application with vuejs3 frontend.
For all the code I provide I removed the most other code and kept what I think is ...