All Questions
Tagged with vue.js vue-router
5,395 questions
0
votes
0
answers
30
views
Nuxt 3 NuxtLink Not Redirecting Properly, Only <a> Tags Work
I'm working on a Nuxt 3 project, and I'm experiencing an issue where NuxtLink components are not redirecting properly. Clicking on a NuxtLink does not navigate to the desired route, but using a ...
0
votes
1
answer
60
views
Why is useRouter() always returning undefined in my library
I have a vue.js library thats supposed to be kinda simple i just have a custom function for creating a vue app like this:
import AppComp from "./components/App.vue";
export const ...
0
votes
0
answers
23
views
Vue router lazy loading not rendering
I'm trying to convert a react project to vue, for educational purposes only. Instead of using RouterLink, I used a regular anchor like:
<li><a href='#' @click="handleNavMenu('/URL')"...
0
votes
0
answers
39
views
404 error when refreshing browser in Vue app
I have a Vue 3 app that utilizes the Composition API, Vue Router w/ history mode, Vite, Vuetify and Typescript.
When I refresh the browser on a different page, I get a 404 error, and I'm pretty ...
0
votes
0
answers
19
views
Nuxt not recognizing directory in interpolated route
I am attempting to create an image link in Nuxt component
<NuxtLink
v-if="player?.image_url"
:to="`/players/${player.slug}`"
>
&...
2
votes
1
answer
85
views
How to use Vuetify in Vue SFC Playground?
I am trying to use both Vue Router and Vuetify in Vue SFC Playground. I began with the Vue Playground example of Vue Router (taken from Getting Started). This had Vue Router already imported, so I ...
1
vote
1
answer
47
views
Lazy Loading Routes with conditions
My routes.js is:
{...
path: ":term",
name: "some-name",
component: () => import("../path/to/com.vue")
}
...
Question is:
How to make smth like this and make it ...
1
vote
1
answer
37
views
Declaring object.prototype in js - VueRouter it automatically calls a method
I declared an extension method for objects by creating my own function. However, I do not call or import it anywhere. As a result, I get an exception. How can I fix this? I don't recall such behavior ...
0
votes
2
answers
62
views
How to create a url-indexed lightbox modal in Nuxt 3 without losing scroll position when it opens?
Problem: when opening a modal / lightbox in my Nuxt app, it resets scrolling of the parent page.
Two criteria seem to clash:
Keep the scroll position intact when opening the modal
Opening the modal ...
0
votes
1
answer
45
views
Vue components keep the old state even when replaced
const queryKey = ref("userData");
const { data, isLoading, error } = useQuery({
queryKey: [queryKey], // Chave única para identificar a consulta
queryFn: async () => {
...
1
vote
2
answers
42
views
Google pages indexation on a Vue.js2 Application ( + Vue router)
Hi folks! o/
I have a few-year-old personal website that I don't use much, but recently, I wanted to check its Google indexation for practice purposes.
Techs used : [ Vue.js2 + Vue-router ]
It's a 5-...
1
vote
1
answer
24
views
Vue 3 Router not displaying the path in the browser
I am migrating from Vue2 to Vue3. The router seems to work properly in the sense that I am being redirected to the correct components, but the url in the browser window does not update i.e. I am in ...
0
votes
0
answers
37
views
Product Detail page not routing in vue js
I have a product list page and productdetails page. When I click on the card of the product,it should go to that product detail page with the ID passed, but it doesnt happen.
I have two console.log. ...
0
votes
0
answers
58
views
How to generate page routes automatically based on "/pages" folder?
I am building an SPA with Nuxt and from the documentation I got the idea that all *.vue files under /pages folder will be automatically used to generate routes. When I run my app locally the routing ...
1
vote
1
answer
121
views
How can I use nested routes in Nuxt 3 to create route-based layouts at the root path (`/`)?
I'm new to Nuxt 3, and I'm trying to replicate some route behavior I implemented with Vue Router in a Nuxt 3 project. Specifically, I want to use nested routes to create route-based layouts for ...