This repository has been archived on 2021-09-06. You can view files and clone it, but cannot push or open issues or pull requests.
vuejs_course/2021-01-19 lists-cond-01-st.../app.js

19 lines
349 B
JavaScript
Raw Permalink Normal View History

2021-01-19 21:05:03 +01:00
const app = Vue.createApp({
2021-01-19 21:26:38 +01:00
data() {
return {
goals: [],
enteredGoalValue: "",
};
},
methods: {
addGoal() {
this.goals.push(this.enteredGoalValue);
},
2021-01-20 19:26:26 +01:00
removeGoal(index) {
this.goals.splice(index, 1);
},
2021-01-19 21:26:38 +01:00
},
2021-01-19 21:05:03 +01:00
});
2021-01-19 21:26:38 +01:00
app.mount("#user-goals");