Skip to main content

All Questions

Tagged with
-1 votes
1 answer
57 views

How do I mounted a object data using axios in vue js

this is my menu page: <div class="col col-md-3" v-for="(product, index) in products" :key="index"> <div class="card"> <...
JustTuyen's user avatar
0 votes
1 answer
136 views

My elements will only appear (sometimes) after hot reloading, but not in first load

I have a file called SpecPlayer.vue where I'm using a component (SpecChampionData) and the component will only appear after hot reloading (not always, sometimes), but not after the first load. I'm new ...
Sylph1de's user avatar
1 vote
0 answers
39 views

AXIOS not working with Same Page with different query parameter Vue3

HI i am facing an issue if i am on this route http://127.0.0.1:8000/indexpage then ajax request not works again for this route http://127.0.0.1:8000/indexpage?subcategory_id=6 i want product on basis ...
Umer Ghouri's user avatar
0 votes
1 answer
2k views

Vue - refresh state on clicking back button in the browser

I am developing a login page, which lists different provider options. If you click on a provider, it will redirect to the sign-in page of the respective provider. This login component has a bool ...
nitcherry's user avatar
0 votes
0 answers
217 views

How to use Vue Router after App.vue Axios request finish?

So, I have my project, that I'm using Pinia + Casl, and everything works perfectly except when I try to reload my page. Of course, I have an entire structure that creates all over the Casl permissions ...
Emmanuel's user avatar
  • 189
0 votes
2 answers
501 views

How to implement login with Axios for multiple types of users?

I am building a web application ( with VueJs) that allows multiple types of users to login (e.g., regular users and administrators). I am using Axios to handle HTTP requests, but I am not sure how to ...
Miloud Mokkedem's user avatar
1 vote
1 answer
886 views

Vue 3 Vue-router 4 Composition API - Calling router.push outside of component not working

In my Vue 3 project, i use the composition API of Vue and i have axios defined as a plugin in plugins/axios.js like this: import axios from "axios"; import { useRouter } from "vue-...
Lucien Chardon's user avatar
-2 votes
1 answer
762 views

cannot use vue-router routes in axios file

I need to redirect to login page if backend throws 401-Unauthorised error. But when I try to use router.push('/login) it throws router is not defined error in axios interceptor. Here is my axios.js ...
Darshan Soni's user avatar
0 votes
1 answer
470 views

Data taked from localStorage after rediraction with $router.push is null

In my Login component I make a request to get a JWT token, set it into localStorage and go to Home page. const response = await axios.post('/auth/login', { login: this.login, password: this....
Dmytro Kotenko's user avatar
0 votes
1 answer
135 views

Vue js router-link Data bind

If I need to summarize what I want to do, when the post page is logged, data is drawn from the database with axios and listed. and then when router-link is clicked or via Url domain.com/post/1 ...
kralyolda's user avatar
  • 115
0 votes
1 answer
1k views

Vue doesn't fetch data from API in first render

After logging in I call await router.push('/'); to redirect to the home page where I load users and I get this error GET http://localhost:8080/users 401 then when I refrehs the page in the exact same ...
Othmane's user avatar
  • 179
0 votes
1 answer
527 views

404 (Not Found) while trying to access single post with Vue 3 and Axios

I have a small app in Vue 3 which I list data from a local json file and then click over to a detail page to view the rest of the data. I am able to list all the data and link to a detail page, but I ...
Charles Smith's user avatar
0 votes
1 answer
3k views

[Vue warn]: Unhandled error during execution of mounted hook

I am creating a to-do web app. I have successfully fetched all the to-do list items and displayed them on my homepage. The problem comes when I try to fetch only one post and display it, which returns ...
Tukei David's user avatar
0 votes
1 answer
209 views

Cannot display axios data in my PostItem view

I am trying to learn Vue router for vue js ( vue 2), so created a small project following some Youtube tutorial,they are fetching data from firebase but in my case I am fetching data from ...
Ayesha's user avatar
  • 221
0 votes
2 answers
2k views

How to redirect to an error page depending on the response code

I have an api that I use to check the weather, but it may return different codes depending on the situation. In my axios.get in the catch block I want to redirect the user to an error page depending ...
Cygnus_bewickii's user avatar

15 30 50 per page
1
2 3 4 5 6