I'm passing the value of a query using the vue-head for the browser title but when I pass the data does not pass any data in the header just send me a message like "undefined" at the top of the browser, this is the code:
export default {
data: () => ({
video: {}
}),
methods: {
getVideo() {
this.api.http.get('videos/${this.videoSlug}')
.then(response => {
this.video = response['data'][0]
})
}
},
head: {
title: function() {
return {
inner: this.video.name,
separator: '|',
complement: 'Canal 10'
};
}
}
}
When I pass the value in this way it sends me with "undefined" but if I pass any data in a static way such as " inner: 'Magazine' " shows it in the browser, some idea of How can I solve this situation?