All Questions
576 questions
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 ...
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=&...
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 ...
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:
+---...
0
votes
0
answers
44
views
I have an error about vue2.js and its router
I have a navbar,Home and login elements. It is simple login page. I want to add api to go home and login page. For this i have router.js file. I am sharing all of file here.
This is my Main.js
...
2
votes
2
answers
495
views
How to Disable the Vue component (div-tag)?
I am trying to disable the VUE component based on the user access settings. Now, I am able to hide the component from the UI, but after every re-render, the component is getting active. I don't just ...
0
votes
1
answer
1k
views
Can't access Pinia store in beforeEnter in vue 2 app
I am using Pinia in a vue 2 app, and am trying to access some state in the beforeEach route guard, but receive the following error:
I've followed the documentation here: https://pinia.vuejs.org/core-...
0
votes
1
answer
28
views
Vue2 page when to query url in lifecyle
I have a page where I want to display a message if a user comes from a certain URL:
If arriving from this URL:
http://www.testapp.com?_a=lookingforthis&token=5b6b7f/account/about
<template>...
0
votes
0
answers
78
views
navigate "forwards" to the previous route with vue-router
In my Vue 2.7 app I'm using Vue Router 3.6.5 for navigation. Say I navigate from page foo to bar, when I click a button on page bar, I want navigation to transition to whatever page I was on ...
1
vote
1
answer
98
views
is there an way to run towice vue apps in one index.html First vue Version is 3 and second vue app version is 2
I created two apps with vue framework, and i want to combine them together in one directory to be like this:
https://host.com/ => runs first vue app EX: Website Store.
https://host.com/admin => ...
1
vote
1
answer
479
views
Vue router picking up window.open on production only
I'm trying to open a different tab for users with window.open
window.open(
'https:/example.com/'+urlParameters,
'_blank'
);
This works perfectly on development (localhost).
When ...
0
votes
1
answer
340
views
How to change in vue parent component css child
Is there a way to set the Vue parent component footer CSS differently only in the subcomponent inside the router?
I want to change the login.vue CSS inside the Router view
I tried both the deep method ...
1
vote
2
answers
1k
views
Best way to check what page you're on in Vue.js
I have
these simple route/URL when I am in a car details page
http://localhost:8080/car/1
I am using vue2; what is the best way to check if I am on a car page?
I normally
would have checked for the ...
-1
votes
1
answer
595
views
How can i redirect correctly my page with router link in vue js 2
i have a problem with router-link component in vue js 2. I create my router file
index.js
import Vue from 'vue';
import VueRouter from 'vue-router';
import HomeView from '../views/HomeView.vue';
...
0
votes
1
answer
1k
views
How do I set a route in hash mode with params with Vue Router 3 (Vue 2)
Currently, my Vue router is using hash mode for my router and I am looking for a way to pass parameters when generating links to another component. so far I came up with this:
this is what it ...