Issue with Vue.js not updating HTML after axios GET request. Here's the structure:
<span @click="tryResponse">
Data_object: {{ data_object }} <br>
Data_object.serial: {{ data_object.serial }} <br>
</span>
Data section:
data(){
return{
data_object: {},
}
},
Method section:
methods: {
tryResponse() {
axios.get('http://127.0.0.1:8000/source/groups/15').then((response) => {
this.data_object.serial = response.data});
}
The above code is from a file named App.vue.
In Chrome dev tools, I can verify that the data object updates correctly but fails to reflect on the webpage.
Edit: Functioning as expected when using:
this.data_object = response.data
However, facing issues with:
this.data_object.serial = response.data