Skip to main content

All Questions

Tagged with
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-...
-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"> <...
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 ...
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 ...
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 ...
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 ...
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 ...
-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 ...
0 votes
1 answer
7k views

[Vue warn]: Error in v-on handler: "TypeError: Cannot read properties of undefined

Trying to post data to a collection (using Vue (2.6.11), Vuetify (2.4.0), Vuex (3.6.2), Vue-router (3.5.1), Axios) but getting this error. Haven't been able to fix it, not sure why it won't work. The ...
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....
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 ...
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 ...
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 ...
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 ...
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 ...

15 30 50 per page
1
2 3 4 5 6