0👍
You don’t have to recreate a new promise object. You can just return the object you want to be passed to the next call.
getProducts: function() {
let url = config.API.GetProduct
return this.$http.get(url).then(response => {
this.products = response.data.resource;
return this.products.map(this.getOwner);
}, error=> {
console.error("An error happened!")
});
},
- [Vuejs]-Error: render function or template not defined in component: anonymous
- [Vuejs]-Filtering array with specified value fails to return a new array
Source:stackexchange.com