After calling Axios get method, my webpage receives a response of some image URL, but I cannot update/refresh/re-render the image alone without re-render the entire page. Can anyone help me with this problem? Examples would be greatly appreciated.
this is my code
<template>
img class="ig-img" src="arrayInstagramRequest[0]" alt="image">
</template>
data: function () {
return {
arrayInstagramRequest: [],
convertedArrayInstagram: [],
id: 0
}
},
httpGetIstagramImage: function () {
axios.get(configFile.basic_url + '/instagram_content/get_all').then((response) => {
while (response.data.result[this.id] != null) {
this.arrayInstagramRequest.push(response.data.result[this.id].instagram_url)
this.id += 1
}
console.log(this.id)
console.log(this.arrayInstagramRequest[0])
}).catch((error) => {
console.log(error)
})
}
dataaswell?