lesson 17: data inside the Vue app
This commit is contained in:
parent
b34a75e338
commit
e594f717c5
|
@ -3,7 +3,8 @@
|
|||
const app = Vue.createApp({
|
||||
data() {
|
||||
return {
|
||||
courseGoal: "Finish the course and learn Vue.",
|
||||
courseGoalA: "Finish the course and learn Vue!",
|
||||
courseGoalB: "Master Vue and build amazing apps!",
|
||||
vueLink: "https://vuejs.org",
|
||||
};
|
||||
},
|
||||
|
@ -11,9 +12,9 @@ const app = Vue.createApp({
|
|||
outputGoal() {
|
||||
const randomNumber = Math.random();
|
||||
if (randomNumber < 0.5) {
|
||||
return "Learn Vue!";
|
||||
return this.courseGoalA;
|
||||
} else {
|
||||
return "Master Vue!";
|
||||
return this.courseGoalB;
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Reference in New Issue