commit | author | age | ||
38b8f3 | 1 | const app = Vue.createApp({ |
CM | 2 | data() { |
f8f722 | 3 | return { |
CM | 4 | goals: [], |
5 | enteredGoal: '', | |
6 | }; | |
7 | ||
38b8f3 | 8 | }, |
CM | 9 | methods: { |
10 | addGoal() { | |
11 | this.goals.push(this.enteredGoal) | |
12 | }, | |
948b23 | 13 | removeGoal(idx){ |
CM | 14 | this.goals.splice(idx,1); |
15 | }, | |
38b8f3 | 16 | }, |
CM | 17 | }); |
18 | ||
19 | app.mount("#user-goals"); |