I have async data loading via jayson from a server. After the data has finished loading, the boolean "loading" is set to false but my content does not re-render. Even though I can see on the console that the data was loaded correctly.
var App = new Vue({
el: '#app',
data: {
title: 'test',
data: [],
loading: true
},
created() {
this.getProjectDataFromServer()
},
methods: {
getProjectDataFromServer() {
client.request('get', null, function(err, response) {
if(err) throw err;
this.data = response.result;
this.loading = false;
console.log(this.data);
});
}
}
});
<main id='app'>
<div v-if="loading===false" :key="loading">
IT WORKS
</div>
</main>