All Questions
14 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
...
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 ...
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 ...
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
<...
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. ...
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 ...
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 ...
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-...
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 ...
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 ...
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 ...
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-...
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 ...
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 ...