1👍
Try this
getshop() {
this.$http.get('http://localhost:3000/api/shopestablishments')
.then(function (response) {
// Save response.data in variable `x`
var x = response.data;
// Call second function with response.data
this.yourFunction(x);
})
}
- [Vuejs]-Create Grids with Dynamic Columns and Data Types( Vue.Js)
- [Vuejs]-Function to empty array doesn't work inside then()
Source:stackexchange.com