0๐
You are missing the slash in your axios request. It should be:
.get('/messages/getMessages/' + id)
- [Vuejs]-Vue js โ passing props to components in vue rotuer
- [Vuejs]-Add class to body before page loads
0๐
I checked and the code is working properly.
messages:function(id){
var self = this;
this.$http.get('/messages/getMessages/' + id)
.then(response => {
console.log(response.data);
this.privateMsgs = response.data;
})
.catch(function (error) {
console.log(error.response);
});
}
- [Vuejs]-How Can I edit data after on a click event on VUE using VUEX?
- [Vuejs]-Vue, How to Normalizing Complex Data and assigning unique Ids
Source:stackexchange.com