Error in data(): "TypeError: Cannot read property 'propsTitle' of undefined"
I cant initialize by props to data. it keeps showing me this error and I can't figure it out why? I read the vuejs tutorial it shows title: this.propsTitle this is the correct way. what am I missing? Thank everyone!
Error in data(): "TypeError: Cannot read property 'propsTitle' of undefined"
props: {
propsTitle: String,
propsLevel: Number,
propsProgress: Number,
},
data: () => ({
title: this.propsTitle,
progress: this.propsLevel,
level: this.propsLevel,
activeBtnTxt: "Start",
isStarted: false
}),
// watch: {
// progress(val) {
// this.progress = val
// }
// },
// mounted() {
// console.log(this.propsProgress)
// // this.progress = propsProgress
// // this.level = propsLevel
// // this.title = propsTitle
// },