diff --git a/lists-cond-01-starting-setup/app.js b/lists-cond-01-starting-setup/app.js index 261c93a..e31cc37 100644 --- a/lists-cond-01-starting-setup/app.js +++ b/lists-cond-01-starting-setup/app.js @@ -1,7 +1,15 @@ const app = Vue.createApp({ - data() { - return { goals: [] }; - }, + data() { + return { + goals: [], + enteredGoalValue: "", + }; + }, + methods: { + addGoal() { + this.goals.push(this.enteredGoalValue); + }, + }, }); -app.mount('#user-goals'); +app.mount("#user-goals"); diff --git a/lists-cond-01-starting-setup/index.html b/lists-cond-01-starting-setup/index.html index 6f381a7..bd82567 100644 --- a/lists-cond-01-starting-setup/index.html +++ b/lists-cond-01-starting-setup/index.html @@ -1,29 +1,29 @@ - + + Vue Basics - + - - + + +
-

Vue Course Goals

+

Vue Course Goals

-

My course goals

- - -

No goals have been added yet - please start adding some!

- +

My course goals

+ + +

No goals have been added yet - please start adding some!

+
- + +