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

const app = Vue.createApp({
data() {
return {
goals: [],
enteredGoalValue: "",
};
},
methods: {
addGoal() {
this.goals.push(this.enteredGoalValue);
},
removeGoal(index) {
this.goals.splice(index, 1);
},
},
});
app.mount("#user-goals");