3👍
✅
The issue might be using the this
inside the complete
callback function. Try using arrow function instead
complete: (results) => {
this.cases = results.data;
console.log(this.cases);
}
Or assign this
to another variable and use it inside the function
let self = this;
complete: function(results) {
self.cases = results.data;
console.log(self.cases);
}
Source:stackexchange.com