Skip to main content

All Questions

Tagged with
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 ...
padavan's user avatar
  • 911
0 votes
0 answers
36 views

Vue Router 2.6 Navigation Issue, cannot navigate back (browser button)

I’m working on a Vue.js (v. 2.6) application that uses Vue Router for navigation between different pages. After logging in, the user is redirected to the home page with the following code: this.$...
Bbird's user avatar
  • 13
0 votes
1 answer
49 views

Vuex and Vue Router - double condition on beforeEnter not working

I have double condition in beforeEnter and nobody can enter to right place. Is there a limit in conditions or what? :( my code in the router file: const routes = { path: `${routerConfig.preRoute}/...
kat.stacevitz's user avatar
0 votes
1 answer
56 views

How to invoke a js function after every page is created?

In my Vue2 app, it's easy enough to call a JavaScript function in the created() method of every .vue file. Not wanting to do this in every file, am I able to invoke a JS function on creation (or mount)...
happybuddha's user avatar
  • 1,356
0 votes
2 answers
112 views

Handling a this.$router.replace(href); in vue 2

I am new to vue and working on vue code those before me created. So there is a lot of legacy code that is just too complex to change right now. The vue code can be in one of two states when a user ...
Sam Carleton's user avatar
  • 1,420
0 votes
0 answers
24 views

Refreshing/Reloading after using Vue Router to redirect

In my Vue component I collect page data for jobs from Contentful. If the page data is missing I want to redirect the user back to another page (the jobs listing page). However, if I use this.$route....
user2953989's user avatar
  • 3,029
1 vote
1 answer
50 views

transferring userId from one component to another using vue router

I have a list of users obtained from the api. I need to make sure that when you click on the user's name, a page with his information opens with a separate link Component UsersList <button @click=&...
Begemot's user avatar
  • 25
0 votes
2 answers
120 views

Fire API call only when a Vue Router child route is hit

I am using Vue2 and vue router 3x. How can I execute a store action whenever a specific child route is hit regardless if it is hit through a button press or the browser back/forward buttons? I need to ...
maxshuty's user avatar
  • 10.8k
0 votes
1 answer
260 views

VueJS: Why is my child route/component only rendering after I refresh the page?

I am having trouble getting a child component to render when I click on it's parent component. When I click on a link to go to my "settings" page, my SettingsSummaryPage is rendered, but I'd ...
Damon's user avatar
  • 4,544
0 votes
3 answers
306 views

HTML5 History Mode from vuerouter not work in production

On my Laravel and Vue.js V2 project, I've implemented Vue Router v3 with History mode. It works perfectly on my development machine. However, as soon as I switch to production, I get the error message ...
Zekura's user avatar
  • 335
0 votes
0 answers
310 views

Migrating to Vue 3 but router view is not working

I having a vue 2 project and currently migrating it to vue 3, but the router-view is not able to render the component while the path is correct. I have check on the issue, the problem seem is because ...
Wai Chun Meng's user avatar
0 votes
1 answer
529 views

How do I reference files located outside of the src folder in a vue project?

I have a vue application that is pulling documents from a database and writing them to a directory at the project directory level of my vue app. The folder structure looks something like this: +---...
sdman02's user avatar
  • 23
2 votes
1 answer
964 views

Vue router in composition api?

In Nuxt 2.16, I'm trying to access the useRouter composable with import {useRouter} from 'vue-router', as in this question, but the import leaves useRouter undefined. When I import * as r from 'vue-...
jcalfee314's user avatar
  • 4,890
0 votes
2 answers
2k views

Anonymous Component in vue Route

I want to use vue-router to switch between two tabs of a side navigation (general and account), but i get <Anonymous Component> displayed in vue devtools and i don't know what i'm doing wrong. //...
Gnvt's user avatar
  • 41
0 votes
1 answer
111 views

Vue router doesn't work with complex routes

I am making a single page application with laravel 7, vue cli 2 and vue-rotuer 3. I have created a "router.js" file where I declare all the routes inside. Simple routes like "/" or ...
Matteo Ruggieri's user avatar

15 30 50 per page
1
2 3 4 5
118