Questions tagged [vue-router4]

190 questions
0
votes
1 answer

Vue router changing the url but not the content

In Songs component I have a list of other albums, so whenever I click on one it should redirect me on /songs/:id. Each album has it's own id. This is working from Home or any other component, but whenever I try to go from for example /songs/1 to…
0
votes
1 answer

How to redirect on other route if condition is true in in router.js vuejs

I have multi auth application in vuejs . So, in router.js i checked that if customer is logged in it should redirect to customer dashboard and if admin is logged in it should redirect to admin dashboard In router.js I have implemented it in…
user13134426
0
votes
1 answer

Vue router access meta data from router-link

I use vue3 and vue-router-4, and am trying to hide some router links for unauthorized users: Route file: { path: "/users/create", name: "UserCreate", meta: { title: "Create user", requiresAuth: true }, component: () => …
walemy
  • 77
  • 1
  • 8
0
votes
2 answers

Vue.js 3- Component doesn't load in VueJS with router

When I click in a router-link to go to register-form page, the URL changes, but the component doesn´t load. I have the navbar in a component, and I thought that it was wrong, but no... Here's the router's file code: import {createRouter,…
Álvaro
  • 385
  • 5
  • 15
-1
votes
0 answers

Transition elements inside component on routing

How apply transition to elements inside component on routing? I have a few components, I need when routing, some blocks move in components. Also I wanna move blocks in parent component(where router-view) depending on route. I think need use…
-1
votes
1 answer

Change route in vue-router without reloading Components

I have a route in vue-router: /items?page=1&rowsPerPage=25&sortBy=state&sortType=desc every Time i change one of the params (sortBy or page=2) i want to stay on the same site, without reloading the components i include. Currently everytime i update…
Gooze
  • 73
  • 1
  • 10
-1
votes
1 answer

Bind "src" attiribute in audio tag within vue code

try to bind src of audio tag invue code bur does not work .. Note that object (surah) is api json object .. this is my code :
-1
votes
1 answer

After adding params to one route all other stop working

after adding parameter to one of the route all other stop rendering correctly (ie. router-view not working at all). Route /download/:id works as expected... Am I missing something in setup? I tried having leaving and removing the /download path…
Tomkys
  • 266
  • 1
  • 3
  • 11
-2
votes
1 answer

How to setup VueRouter correctly?

I want to create a vue application using VueRouter My main.js file looks like this: import VueRouter from "vue" import MyApp2 from "./MyApp2.vue" import { createApp } from "vue" import { createWebHashHistory } from "vue-router" // 1. Define route…
user172501
  • 332
  • 2
  • 11
1 2 3
12
13