Skip to main content

Questions tagged [vue-router]

Vue Router is a routing library for single-page applications designed for use with the Vue.js framework.

0 votes
0 answers
19 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....
Dionico Noe C. Alegarbes's user avatar
0 votes
1 answer
32 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: '/', ...
KSPR's user avatar
  • 2,334
0 votes
1 answer
31 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 ...
Avish95's user avatar
0 votes
1 answer
23 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: '...
gespinha's user avatar
  • 8,258
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 ...
ernoa's user avatar
  • 27
0 votes
0 answers
39 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 ...
Алексей's user avatar
0 votes
0 answers
38 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 ...
U005_Aryann Dwivedi's user avatar
0 votes
0 answers
26 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 ...
demiglace's user avatar
  • 643
0 votes
0 answers
15 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 ...
Eps's user avatar
  • 1
2 votes
1 answer
68 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 ...
Tarakos's user avatar
  • 23
0 votes
0 answers
45 views

Return a Rewrite in Nuxt3 with Nitro server middleware

For a nuxt3 app with the following folder structure: pages/ ├── foo.vue └── bar.vue server/ └── middleware/ └── index.js How can a rewrite be returned from index.js? Here is a link to a live ...
dbzx10299's user avatar
  • 944
0 votes
1 answer
39 views

Best way to implement conditional tabbed routing in vue

What I'm trying to implement is routing with tabs where the available tabs change depending on the user type (upon authentication the user type gets stored in a pinia store). This is what I ended up ...
darkbasic's user avatar
  • 313
0 votes
0 answers
45 views

TypeError: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'

I am new to vue.js and i'm trying to upgrade a relatively big vue 2 project to vue 3 and after i updated all the necessary files, i came across this TypeError: Failed to execute 'insertBefore' on '...
efe.tsdmr's user avatar
0 votes
1 answer
27 views

Nuxt 3 child route with dynamic parameter not getting active-class

I have the following folder structure. And the following pages are of important /workshops and /workshops/workshop-1. The issue I'm having now is that my active-link works for /workshops, but not for ...
Miguel Stevens's user avatar
1 vote
1 answer
39 views

How to unit test vue beforeRouteUpdate hooks

I have the following vue component, which uses onBeforeRouteUpdate hook to call the init() method when the route param changes (test/a -> test/b). The following stackblitz instance shows the output ...
demiglace's user avatar
  • 643

15 30 50 per page
1
2 3 4 5
415