Every time I use the "this" keyword in my code, it highlights and says that "Object is possibly undefined
Every time I use the "this" keyword in my code, it highlights and says that "Object is possibly undefined
When you define the data property as an arrow function you should pass this as parameter like:
data:(vm)=>{//vm represents this keyword
return{
....
productType:vm.$route.path.slice(1).split("/")[0]
}
}