Skip to main content

All Questions

0 votes
1 answer
2k views

how to pass id for get data from api with axios.post?

I have the first two URL requests for the first page, the second to get the data of each item on the firstpage, and according to the image below in my postman, how to send the ID of each item with ...
fgkh's user avatar
  • 11
0 votes
1 answer
3k views

Vue CLI - TypeError: Cannot read properties of undefined (reading '1')

I'm beginner in VueJS and hoping for your help. I'm trying to create Weather forecast app based on OpenWeatherMap API. The concept is such that: Enter some location to input on homepage and click to ...
Ioann Sulyma's user avatar
2 votes
1 answer
1k views

Vue 3 <router-view> got commented after build using history mode

When I build my Vue project using hash router mode it works perfectly, but when I build it using history mode, it only shows the navbar and commented the <router-view>. I have also configured my ...
Kevin Yobeth's user avatar
  • 1,017
2 votes
3 answers
7k views

Blank page when serving my app (Vue Router 4 - Vue 3)

I have made the first npm run build to take my first big Vue3 application to a real-world server test drive. So I got the files, uploaded them into my VPS, and surprise: The server only recognizes the ...
Slaveworx's user avatar
  • 621
2 votes
1 answer
671 views

Switching between Vue Router pages cause multiple event fire on VueJS mounted()

I am working on an Electron project where I use Vue CLI project and the Vue CLI Plugin Electron Builder. Everything works great except a weird bug that I found recently. Whenever I navigate between ...
mmik's user avatar
  • 6,041
0 votes
1 answer
237 views

Vue CLI build - develop locally with "/" as root but deploy to "/subfolder/" as root?

I have a Vue locally, the main /index.html is the webroot but when I deploy, I want the subfolder /stats to be the root (and all my routes to still work). Can I do this without manually changing my ...
Kirk Ross's user avatar
  • 7,183
5 votes
3 answers
5k views

Is there a way to load different views for one route depending on user role?

Is there some implementation if I want to use the main page path '/' for different views depending on roles? Like if you are an authorized user you will see the MainAuth, if you are a guest you will ...
fitzima's user avatar
  • 79
0 votes
2 answers
2k views

How to make pagination and content render on browser back button in Vue cli?

I am trying to make in Vue.js CLI table with pagination and pages I have API backend and everything. Now I have URL with "?page=1" and I want when I click on browser back button my table and ...
ADEV's user avatar
  • 5
2 votes
1 answer
410 views

Can I make Vue.js keep-alive work across sites?

I'm using the <keep-alive> tag in Vue (as described in this question) to preserve the state of components across routes, so that when I navigate to different parts of the app the state isn't ...
vvye's user avatar
  • 1,320
0 votes
1 answer
5k views

vue router with Navigation Guards- next() not working

Protecting Vue Routes with Navigation Guards. The Navigation Guards is working when onload or refresh, but the next() function is not working when accessing routes using <router-link>. <...
Kenneth's user avatar
  • 3,003
0 votes
1 answer
38 views

Vue.js cannot change data in other hook and methods

I'm developing vlog service with flask, vue. Between two components of vue - PostList and PostDetail vue -, I use Eventbus to send postId. PostList send postId and PostDetail receive it. And then i ...
suyoung's user avatar
0 votes
0 answers
165 views

Why can't I change document.title in vue-router?

I am trying to change document.title in vue-router, below is my code: router.beforeEach((to, from, next) => { if (to.meta.title) { document.title = to.meta.title } next() }) ...
Ch.dyc's user avatar
  • 1
1 vote
1 answer
389 views

How do you properly use various JS (in this instance svg.js) libraries with vue / @ cli UI?

Using Vue CLI 3 ui I have installed the following extra dependencies svg.js svg.connectable.js svg.draggy.js However I cannot seem to use the libraries in app as I am unclear on how to import them ...
adamprocter's user avatar
1 vote
0 answers
3k views

Vue router doesnt work in the production environment

I am making a vue-cli application using the webpack template, so far when I run: npm run dev everything renders perfectly and my route works fine. But after running: npm run build I had my dist ...
Christopher's user avatar
1 vote
1 answer
2k views

Vue cli not working with history mode

I am using vue cli and for some kind of reason my vue app works perfectly fine in dev mode. But when I build the project for production my app stops working. I don't get any errors, but my app just ...
Bas Ariaansz's user avatar