From bf1973a608f12d29a307b9e5480cd26ba9e66b60 Mon Sep 17 00:00:00 2001 From: Andreas Zweili Date: Wed, 20 Jan 2021 19:26:26 +0100 Subject: [PATCH] finish lesson 46 --- lists-cond-01-starting-setup/app.js | 3 +++ lists-cond-01-starting-setup/index.html | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lists-cond-01-starting-setup/app.js b/lists-cond-01-starting-setup/app.js index e31cc37..778ebb7 100644 --- a/lists-cond-01-starting-setup/app.js +++ b/lists-cond-01-starting-setup/app.js @@ -9,6 +9,9 @@ const app = Vue.createApp({ addGoal() { this.goals.push(this.enteredGoalValue); }, + removeGoal(index) { + this.goals.splice(index, 1); + }, }, }); diff --git a/lists-cond-01-starting-setup/index.html b/lists-cond-01-starting-setup/index.html index b30b8b2..cdcfb42 100644 --- a/lists-cond-01-starting-setup/index.html +++ b/lists-cond-01-starting-setup/index.html @@ -21,7 +21,10 @@

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