Questions tagged [vue-router4]
The vue-router4 tag has no usage guidance.
vue-router4
213
questions
0
votes
1
answer
29
views
Vue Router not finding query params
Vue 3, Vue Router 4, web hash history router
I have a url with a query param that gets inserted, but Vue seems to ignore it and it's causing weird redirect issue for my application.
For example:
Is: ...
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
52
views
Vue.js 3 Composition API cannot pass router parameters
Get parameters from vue-router 4 with composision API vue.js 3 doesnt seem to work, its was easy on vue.js 2 before,
anyhow heres my code
import { ref, onMounted } from 'vue'
import { ...
0
votes
1
answer
29
views
Vue Router does not update the path in the address bar
I'm using "vue": "^3.4.21" and "vue-router": "^4.4.0"
main.ts
import { createMemoryHistory, createRouter } from 'vue-router'
# ...
const app = createApp(App)
...
0
votes
1
answer
40
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 ...
0
votes
1
answer
24
views
Vue3 + i18n-vue Override language detection?
I'm using vue3 with i18n-vue with language prefix. i18n-vue provides language detection (probably using browser language). How do I add custom detection?
eg) when a user hits /, i18n performs language ...
1
vote
1
answer
199
views
Vue 3 Router issue, no outlet, no displayed content
I have a vue3 application which works perfectly fine when embedding all packages in the directly (locally) in the output bundle.
package.json
"vue": "^3.4.29",
"vue-router&...
1
vote
1
answer
43
views
Escape colon in Vue router wikipedia-style
Context
I've been trying to replicate what wikipedia does with their URL
It works something like
/[Namespace]:[PageName]
/[PageName]
So if I go to /randompage I get as params:
namespace: ''
page name:...
1
vote
1
answer
66
views
Vue-Router render the component but doesn't change the url
import { createMemoryHistory, createRouter } from "vue-router";
import { AuthUser } from "../../auth/user";
const routes = [
{
path: "/",
component : () => ...
1
vote
1
answer
99
views
Vitest - ReferenceError: location is not defined
I'm trying to set up vitest for a Vue application that was recently converted from Vue 2 to Vue 3. I'm getting the following error, and have been unsuccessful in determining what the problem is. ...
0
votes
1
answer
70
views
How to properly scroll to an Element in VueJS when navigating back from a route, using an offset?
I am fighting with the Vue Router (Version 4.2 in my case). I want to achieve that when the user returns from navigation to another route, the original vertical position is restored.
const router = ...
0
votes
1
answer
39
views
Routing to a link in Vuejs directly after it has been deployed on netlify
I created a Vuejs/Vuetify and Vue router site, after I deployed it to netlify, if I try to go to a link direct netlify brings up a page not found screen, what can I do?
I don't know what else to do, ...
0
votes
0
answers
23
views
this.$router.push is causing a leaveGuards.forEach is not a function error
I am using Vue3 and Vue router 4, while tyring to run this.$router.push
it throws leaveGuards.forEach is not a function
I see that https://github.com/vuejs/router/blob/...
0
votes
0
answers
57
views
How can I conditionally include content without a jarring animation?
In my Vue.js app, I have a structure like this:
<template>
<Base>
<RouterView/>
</Base>
</template>
Where Base looks like:
<template>
<...
0
votes
1
answer
72
views
Is it possible to take a vite/vue3 app and transform it so that it is not reliant on any build tool?
I have a web application that was built in vue 3 and reliant upon vitejs as a build tool. I am now being asked to remove the vitejs build tool due to security reasons. Is this even possible? The app ...