Most voted "vue-router" questions
25 questions
Sort by count of
-
5
votes2
answers157
viewsChange view/component but not URL
I’m working on a page 404, work well, I have the following: const router = new VueRouter({ routes: [ // ... { path: '*', component: NotFound, name: '404', meta: {page_title: '404 NOT FOUND'} }, ]…
-
4
votes1
answer4066
viewsjwt authentication with vuejs
I’m a little confused with the authentication using jwt token, I have an application in vuejs + Vue-router, I don’t want to use vuex until I learn to do it without it (I don’t like to use what I…
-
3
votes1
answer136
viewsHow to perform a "back" Transition using Vue Router?
I’m making a simple transition in a webapp (using Animate.css), where the user clicks on a button and the current component leaves the screen on the left and the other component comes from right to…
-
3
votes1
answer770
views$router.push is not working in Vuejs
Good evening, I’m starting my studies in web development and I chose Vuejs with Vuetify to begin with. Right away I’m not getting a page change by clicking on a button. I installed the Vue-router by…
-
2
votes1
answer419
viewsPass $route as parameter to a Vue JS function
It is possible to pass $route as a parameter for a function? <v-btn color="info" v-on:click="getProximo('this.$route')"> Próximo </v-btn> I need to get a parameter that’s in $route, but…
-
2
votes1
answer28
views(VUEJS) Access the router query before injecting the services into vuejs
(VUEJS) You can access the information that is sent by query on the router before injecting the services of an application? For example: import Vue from 'vue'; import App from './App.vue'; import…
-
2
votes1
answer95
viewsPosition text before and after a hyphen aligned to the center
I have two information, an email and a number ( phone ), between the two put a hyphen. I want to center the hyphen in the middle of the screen and put the email on the left side of that hyphen and…
-
2
votes1
answer80
viewsError redirecting user to login page with Vue 3
good afternoon, I am getting the following error while trying to redirect the user to the login page, on Vue js 3 This page checks if the user has a token to see if they are logged in. If they are…
-
1
votes0
answers320
viewsUpdate value of Vuejs page
I ended up bumping into a problem I’m having trouble solving. When creating a page detalhes, I call her using this.$router.push({name: 'Detalhes'}) And step one parameter this.$router.push({name:…
-
1
votes0
answers28
viewsContext of the Vue component is going wrong
I have a problem in the development of a project using in Vue2, when I look for the context of the component, it does not return me the "right" context, as for example the: $router that if you want…
-
1
votes1
answer144
viewsfilter routes by a prop in the meta. Vue.js
I have a prop in the goal of some routes called "displayname", I wanted to play all routes that had this prop in a navbar.. I have tried but unsuccessfully, so far I can pull all routes to the Nav…
-
1
votes1
answer640
viewsChanging content of a Vue component based on the URL
I would like to know how to change the content of a component based on a parameter that is in the url of my site. I’m developing a portfolio and in it I created a file called Works.See. I don’t know…
-
1
votes0
answers33
viewsRun scripts on route when accessed directly
Well I have a little problem that when someone accesses http://www.meulink.com/route without having opened directly in the index (http://www.meulink.com/) and navigated by menu, the scripts…
-
1
votes0
answers46
viewsVue router - problem with dynamic links
So, I am developing an application with Node and Vue, and I came up with a problem when generating dynamic links: In my backend I have a getBeerByStyle function (which works correctly). On my front,…
-
0
votes1
answer292
viewsRefresh page conflicting between Windows and vuejs
I’m studying the integration between Windows and vuejs, however, when I configure the routes through the Vue-router, when doing a refresh on the page, the Windows does not find the page or so, I…
-
0
votes1
answer126
viewsClear history of`-router`when loading main menu
In a PWA I’m using Vuejs and I’m having problems with the back button of the smartphone, because when I use it the PWA does what is most logical and back to the previous screen. But I just log in to…
-
0
votes1
answer226
viewsVue-router replace not working?
I am developing a PWA and I am having problems with the router, because when I use the back button of my smartphone it goes through all the previously visited routes only to after exit the…
-
0
votes1
answer119
viewsVue-router + firebase
I’m trying to make a login system with Vue and firebase, but I’m having trouble redirecting the user after authentication: login: function () { firebase.auth().signInWithEmailAndPassword(this.email,…
-
0
votes1
answer285
viewsProblem including JS file in project with Vuejs 2
I have the following problem: By including a local file . js in my project with Vuejs I get the following error message. Follow my structure and code: I realized that if you include an external…
-
0
votes1
answer559
viewsVue-router: hide components in page change
I am learning vuejs and now I came across a difficulty in hiding components when show the other routes for example: <template> <div id="app"> <ion-icon name="help-circle-outline"…
-
0
votes1
answer194
viewsHow to open my 404 component in case of error without changing the URL in Vue.js
How do I open my "Notfound" component, inside another component, using beforeRouteEnter, without changing the url? I created a dynamic route, and a * to open "Notfound" in all other cases. { path:…
-
0
votes1
answer23
viewsReload the page in Vue 3 no dist can not find the page
Creating a simple application in vue3 cli and entering the router page he gives me this code -> import { createRouter, createWebHistory } from 'vue-router' import Home from '../views/Home.vue'…
-
0
votes0
answers18
viewsProblem reloading page that has parameter in Vue
Sometimes it is necessary to send a parameter through a route In my case it’s happening like this: When my route (URL) has no parameter, I can press the F5 key and the page loads normally. But when…
-
-1
votes1
answer110
viewsRestrict routes Vue router
I am working on an article posting application and would like the user to have access to edit only their projects. Currently, if I change the article id manually, I have access to edit content from…
-
-3
votes1
answer202
viewsRoute does not work in Vue.js - Go to ' / ' instead of ' ' /login '
Good night, you guys! I’m starting to learn and am creating my first project with Vue.js. It happens that I created a route '/login' but the component that loads is the 'Content' that is at the root…