Skip to main content

All Questions

Tagged with
1 vote
1 answer
446 views

VueJS MEVN stack - axios put 'Error: Request failed with status code 404' although Postman 'put' works fine

I'm following a tutorial to build a full stack app using VueJS and the MEVN stack. I have a) built mongo db b) build api back end with one mongoose model 'Student' c) got the back end api running at ...
Phil Anderson's user avatar
0 votes
1 answer
518 views

Method 405 is not allowed, but in the API routing I defined POST

I am creating a SPA with the help of Laravel and Vue and the routing has worked previously, but for some reason it is giving me this error now: "Method 405 is not allowed". Here is the ...
Sander Plomp's user avatar
0 votes
1 answer
848 views

How to redirect Vue app to login page on 401 error?

In my Vue.js component I make async call to API on mounted lifecycle hook: mounted() { this.getDataFromApi() .then(data => { this.events = data.data; this.totalEvents = data.meta.total; ...
Taras Subbota's user avatar
0 votes
1 answer
3k views

How to use $router.push in Vue-router?

i need to use $router.push in Vue-router. Check my code: axios.interceptors.response.use(function (response) { return response }, function (error) { if(error && error.message === '...
Aleksnadar's user avatar
1 vote
1 answer
57 views

I'm trying to populate a second view with data by id from a router-link'd button in my first view. Not sure if I should go through the BaseURL

Is there a way to make this happen by id through the URL? And how do I set it up that the information that populates on the second page is only by that id number? Having a major braindead moment &...
user avatar
1 vote
1 answer
12k views

How to pass dynamic parameter (ID) to axios api call?

I have an api with the last part dynamic: src/api/user.js export function getProfileData() { return request({ url: 'http://localhost:8000/profile_update/DYNAMIC USER ID HERE', method: 'get',...
theflucs's user avatar
  • 227
0 votes
3 answers
5k views

Cant display data in datatable using vue axios

I dont know why my data wont show in my datatable but when I check the console and the vue tool i can see my data. When I compile my js files it wont show me an error. Im just using the datatable and ...
draw134's user avatar
  • 1,197
2 votes
1 answer
2k views

Dynamic usage of axios.all

I would like to re-use the same Vue-component for editing and creating new users. As I am working with vue-router I added a beforeRouteEnter, which fetches data via API. Depending on if there's an ID ...
SPQRInc's user avatar
  • 218
0 votes
1 answer
2k views

How to click on a user & show the user details in another component/view with Vuejs router?

I am doing a project with Vuejs and I need to the following: Use an API & fetch a list of users (just the names of the users) in the home page. Create a custom search filter to find users by name. ...
Manuel Abascal's user avatar
1 vote
1 answer
1k views

Cannot read property 'push' of undefined - vue and axios

I have; An API built from express running on port 2012 An Vue app running on port 8080 The Vue application communicates with the API using Axios. I have been able to register users and log them in ...
Andrew Baker's user avatar
7 votes
1 answer
13k views

Vue-Router in axios interceptor

I create one project with the vue-cli 3, so I run: >vue create my-app; >cd my-app >vue add axios the vue create in my my-app\src\plugins\ the file axios.js with this code: "use strict"; ...
Fabio Ebner's user avatar
  • 2,793
0 votes
1 answer
4k views

Vue-Router Data Fetch: Fetch Data before 'beforeRouteUpdate' loads component

I am new to vue-router navigation guards and so I recently realized that I needed to use beforeRouteUpdate guard for reused components where for example: Going from /foo/1 to /foo/2 However, while ...
pk_45's user avatar
  • 13
1 vote
0 answers
44 views

how to write routes in a laravel + vuejs 2 + vue-router + vue-axios project?

this is how i've set the files in /ressources/assets/js/ file: /js/router/index.js & /js/router/mainRoutes.js, i wish to put my routes in mainRoutes.js /js/store/index.js for state management (...
Michel Tchoutang's user avatar
0 votes
1 answer
4k views

How to redirect to the dashboard component page after login successfully(login component) in vue js?

Hello I want to redirect routing my login component page to the dashboard component with successful login. I have done a response through my local API having a status code 400 & status code 200 ...
Mittal Shah's user avatar
1 vote
1 answer
2k views

Vue JS router query passing and bind to the axios

My use case is something like this. User come to questionPapersTable.vue and choose a paper name and hit on a Start exam button then the user is route to the startExam.vue component from there I want ...
margherita pizza's user avatar

15 30 50 per page