2👍
✅
You lost your context when you defined your ajax callback.
$.ajax({
url: '/things.json',
success: function(res) {
this.things = res;
}.bind(this)
})
You could also do it with some of the code you commented out.
mounted: function() {
const that = this
$.ajax({
url: '/things.json',
success: function(res) {
that.things = res;
}
});
}
👤Bert
Source:stackexchange.com