Vue.component('HeaderBase', function (resolve, reject) {
setTimeout(function () {
resolve({
template: '<div>{{ posts.html }}</div>',
data: () => ({
temp: {
html: '<div></div>',
name: "Hello World "
},
}),
created () {
axios.get('http://.../test/1/')
.then(response => {
this.temp = response.data
})
}
})
}, 1000)
})
Find more questions by tags Vue.js