0👍
✅
fetchAnnounce: function () {
axios.get('/api/announces')
.then(function (response) {
this.announces = response.data;
console.log(this.announces);
}.bind(this))
.catch(function (error) {
console.log(error);
});
}
Source:stackexchange.com