All Questions
49 questions
0
votes
0
answers
35
views
Why won't data persist in a component that is reused?
I have a Vue component that is rendered on a route like this:
{
path: '/chat/:Username(\\w+)?',
name: 'ViewChat',
component: Chat
}
The Chat.vue component should render at the path /chat and ...
2
votes
1
answer
146
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 ...
0
votes
0
answers
70
views
Facing issues in nested routes in Vue-3
I am creating a simple CRUD application for users based on different roles, but I'm facing issues with nested routes and component rendering. I have carefully reviewed their official documentation, ...
0
votes
0
answers
187
views
Module not found: Error: Can't resolve 'vue-router' in '{Project Path}\src'
In my vue.js project, I put this code :
import {createRouter, createWebHistory} from 'vue-router';
on the file router.js, but when I try to run the project on browser I always got this error message
...
0
votes
1
answer
38
views
vue3: Optionally turning RouterLink into a link
I checked the docs but before opening a vue feature request I'd like to be sure if it's implemented already.
I'd like 'My link text' to optionally become a link without having to duplicate the content ...
0
votes
1
answer
469
views
Right way of middleware in vue-router
I have created routes in vue, and defined some middleware conditions before each route. But It's not working as I expected.
This is router/index.js file.
const token = computed(() => useAuthStore()...
0
votes
1
answer
98
views
Vue route not being registered
I am trying to add a new route to an existing web app:
This is the entry point:
// main.js
import router from './router';
... etc
new Vue({
router,
... etc
render: (h) => h(App),
}).$mount('...
1
vote
1
answer
393
views
vuetify v-list-item not recognizing named routes
I'm learning vue so this could be "school" error, I was searching for answers but lot's of them are couple years old.
I'm using vuetify ^3.0.0
my route:
const routes = [
{
path: '/...
0
votes
1
answer
376
views
How can I implement Vue 3's built in KeepAlive component to cache a child component of a page so that it only calls it's API on first page load
My project is Vue 3, Vue Router 4, and I'm using script-setup.
I have a reporting page specified like this in my routes.js:
{
path: '/reporting',
name: 'reporting',
component: () =...
1
vote
1
answer
980
views
Nuxt 3 wrong (old) route in setup script
I would like to use the route and its parameters in the setup script of a component in Nuxt 3. I run into a problem when navigating by nuxt-link where the route in the setup script of the component ...
0
votes
2
answers
668
views
Close menu after changing route: VueJs3 + Tailwind (vue-router)
I am trying to createa nice navigation menu that's responsive and can be toggled in mobile.
When in mobile, I want the hamb menu to be opend on click and then close when I'm changig page.
But when I ...
1
vote
1
answer
2k
views
Problem: Unhandled error during execution of setup function and Unhandled error during execution of scheduler flush
I have a component UserView:
<template>
<div>
<div class="text-center w-full text-xl text-green-700" v-if="isLoading">
Loading...
</div>
<div ...
1
vote
1
answer
2k
views
[Vue warn]: Unhandled error during execution of async component loader at <AsyncComponentWrapper> at <App> when loading a SFC using vue3-sfc-loader
Here is the code:
<div id="app">
<h1>Hello App!</h1>
<helloworld></helloworld>
<p>
<router-link to="/">Go to Home</...
0
votes
1
answer
164
views
Hide/disable VueJs Component
I have a bunch of components, and the users are allowed to access only certain components based on their permissions. How to disable the component?
These are the routes:
{
path: "/...
0
votes
0
answers
40
views
Unable to access meta object in routes-VueJs
I am unable to access the neededPermissions array in the routes. I clearly have the array neededPermissions in routes but every time I try to access the array, console logs undefined.
How can I get ...