Skip to main content

All Questions

0 votes
0 answers
53 views

TypeError: u.then is not a function in Vue3+Vue router

Console Error TypeError: u.then is not a function at index-CyodobdF.js:26:14273 at Object.runWithContext (index-CyodobdF.js:14:10931) at we (index-CyodobdF.js:26:19934) at index-...
825's user avatar
  • 11
2 votes
3 answers
6k views

How to reload the same route in vue 3 (vue-router 4)

I encountered a curious case during development. I have a modal component that warns users about a change in price: If a user clicks the button I want the page to reload and automatically run the ...
Ivan_OFF's user avatar
  • 357
1 vote
1 answer
730 views

Is it better to use RouterLink or router.push for a button?

I am using Vue Router 4 in Vue 3 Composition API, and I want to make a back button. I want to know what is the most optimal and good practice to redirect, a RouterLink or the router with the push ...
Javier4le's user avatar
1 vote
1 answer
241 views

Vue router TypeError issue causing site not to render

I've been fiddling with Vue for a side project and have been trying to implement routing using vue-router, but I can't seem to find a solution to this TypeError I'm getting, which is preventing the ...
Dylan I.'s user avatar
4 votes
2 answers
5k views

Unknown variable dynamic import : ../views/Admin/Home.vue Vue3-vue-router4

Using Vue3 - Vuerouter4 - Vite I try to import the components and routes in vue router but I face this error (only for the route that has children in my paths): my router code: import { ...
Ali Babaee's user avatar
0 votes
2 answers
2k views

How to solve vue-router Uncaught TypeError?

I am trying to upgrade my project from vue 2 to vue 3. But constantly I getting errors. This is my new console error: vue-router.mjs:3499 Uncaught TypeError: Cannot read properties of undefined (...
edche's user avatar
  • 680
1 vote
2 answers
5k views

Vuejs How To Use Multiple Template

I want to use different components for admin panel-website. I try that; // App.vue <template> <PanelTemplate v-if="$route.meta.template == 'panel'"/> <WebsiteTemplate ...
Ömer Faruk Demirel's user avatar
1 vote
1 answer
485 views

Vuejs How to have many <a> tags and hashtags within <router-link> or @click function

enter image description here i want to have a post card like twitter post card, if clicked on any part of the post card goes to post page, but when clicked on hashtags or links goes to the hashtag or ...
Benjamin Chuks's user avatar
9 votes
2 answers
20k views

Failed to resolve component <router-view> VueRouter

I have a project build with Vue.js 3.2.13 and Vue-Router 4.0.14. I think I do everything right but the browser raises an error "[Vue warn]: Failed to resolve component: router-view If this is a ...
yasinkuyuk's user avatar
0 votes
1 answer
178 views

Can I use vue-router to data-bind a dropdown's value to a URL's query parameter?

I want to bind a dropdown to a query parameter in the URL, so when opening /page?dropdown=foo, I want the dropdown to have foo pre-selected and the other way round: when changing the dropdown's value ...
theHacker's user avatar
  • 4,043
4 votes
2 answers
8k views

error while using params in the router.push function vue-router 4

hello guys i'm new to vue js and i'm trying to pass paramenters to a specific router this should happen when i click on a card research and then it will redirect to the research details component ...
nerween's user avatar
  • 41
0 votes
0 answers
181 views

Creating multiple Vue components with internal router

Is it possible to use Vue Router to create internal navigation for components added via a for loop? ┌────────────────────────────────────────────────────────────────┐ │ ...
overbyte's user avatar
  • 648
1 vote
2 answers
6k views

VUE 3 Force unmount when deactivated

I have VUE app which uses keep-alive method in the router. Many pages needs to be loaded only once but some specific pages need to be loaded again each time activated. <template> <router-...
Stan Mayan's user avatar
0 votes
2 answers
1k views

Vue-router routes to the wrong page, the link has to add a '#' before the path

This is my home page: and this is my blog page: I'm using vue3, the code goes blow: import { createRouter, createWebHashHistory } from 'vue-router'; import Home from '../views/Home.vue'; import ...
刘嘉琪's user avatar
  • 169
0 votes
1 answer
793 views

Vue3 Redirect with dynamic property

I have this configuration in my router.ts: { path: "/admin/operations/job-allocation/:id", name: "JobAllocation", component: () => import( "@/views/admin/...
Riza Khan's user avatar
  • 3,170

15 30 50 per page