Currently, I am experiencing an issue where I am passing a props to one of my views, but when I print the result in console it shows up as undefined. This is causing difficulties as I am unable to make requests or consults. Here is the code snippet in question:
export default {
props: ['idVideo'],
data: () => ({
videos: []
}),
created() {
//actions performed after creating Vue instance
this.api = new ApiCanal10({})
this.getRelVideos()
},
methods: {
getRelVideos: function() {
//printing in the console
console.log(`video/related/${this.idVideo}`)
}
}
}
An image displaying the output in the view compared to the console, where it shows undefined can be seen here.
I would greatly appreciate any assistance provided to resolve this issue.