Skip to main content

All Questions

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 ...
Ruslan Karimov's user avatar
2 votes
0 answers
439 views

Is it bad practice to set an "isAuthenticated" flag in LocalStorage?

This is more of general frontend question, but for context, I'm using Vue 3 and vue-router. I'm constructing functionality for authentication with Vue 3. Because I'm not using Vuex, I couldn't find a ...
John Kealy's user avatar
  • 1,913
2 votes
1 answer
5k views

How to fetch data before rendering using Vue 3 and the composition api

I want to fetch some data from an API an then populate my store (for example, user info) but I cannot find a way to do it before the entire page and components loads. I discovered that there is a ...
alex3025's user avatar
  • 139
0 votes
0 answers
322 views

Vue 3 reactive property value not updating in template

I have a component with reactive property that updates when vue route change in console log I can see that reactive value changes but not in the template. How can I make the template update? Code <...
PenAndPapers's user avatar
  • 2,108
1 vote
0 answers
563 views

Problem with Vue Router when changing parameters of a view

I am making a website with vue.js and PHP 7. It is a website of a communication medium where you can view articles. I have a home view where I call the back when it is created and get all the items. ...
A. Gomez's user avatar
0 votes
1 answer
152 views

Vuex problems, important project, MapActions,MapGetters

The reason why I am writing here because I just got a job as a front-end developer and on the first day they threw at me a big project and I lost, very lost, hopeless. My job would be that I am having ...
endoftheworld's user avatar
0 votes
1 answer
973 views

Vue - Pass components to router-view on dynamically loaded component

I need to render a different layout for the same route for a specific URI with different components depending on the user being on mobile or in desktop. I would like to avoid having route path ...
beerLantern's user avatar
1 vote
2 answers
1k views

How to use Vue without changing path when loading view?

I am creating an addon for Firefox using Vue.js. I want it to have routes for multiple components. However, every time I click on a link from router <router-link to="/about">About</router-...
AbUndZu's user avatar
  • 153
0 votes
1 answer
163 views

Prop value isn't updating in child component Vue.js

I'm adding a way for the parent App.vue tell all child components to close every modal you have open and for any given child to tell the parent to hide the overlay if someone clicks on the main app ...
Edgar Quintero's user avatar
1 vote
1 answer
2k views

stack vuetify elements in one page

Using vuetify, how can I make two UI components show up on one singular page? I have tried combining elements within one bracket and got error messages. When stacking components in separate only ...
Matt's user avatar
  • 15
1 vote
0 answers
837 views

vue-router doesn't render child component

I am trying to push dynamic child route by $router.push({ name: 'Warning', params: { id: warning.id }. But when I press the button that push route - route changes correctly, but component is not ...
Никита Лебедев's user avatar
0 votes
1 answer
87 views

Vuejs - Router doesn't render third component in app. First two are working

I created my first Vue app and I have a problem with the router. I have 3 components first 2 works perfectly but 3 doesn't. Here is my code: index.js import Vue from 'vue' import Router from 'vue-...
xaos_xv's user avatar
  • 769
0 votes
1 answer
5k views

Unexpected token import with vue-router

I'd like to store my Vue templates into variables so I can route them. I created an App.vue file containing only a HTML title (for testing purposes), and a main.js file with an 'import' command that ...
Xobtah's user avatar
  • 545
2 votes
3 answers
3k views

Vue: Getting the router instance in children components

I'm using Vue.js and vue-router, I'm trying to navigate on a click event. According to vue-router documentation I should use the router.push(name) API function. The thing is that the router is ...
Shikloshi's user avatar
  • 3,831