Cristiano Magro
2024-12-26 948b23dac23898dfb4e340840d6f94458c5dd2ba
remove itme form list
2 files modified
5 ■■■■ changed files
03 - lists conditional/lists-cond-01-starting-setup/app.js 3 ●●●●● patch | view | raw | blame | history
03 - lists conditional/lists-cond-01-starting-setup/index.html 2 ●●● patch | view | raw | blame | history
03 - lists conditional/lists-cond-01-starting-setup/app.js
@@ -10,6 +10,9 @@
    addGoal() {
      this.goals.push(this.enteredGoal)
    },
    removeGoal(idx){
      this.goals.splice(idx,1);
    },
  },
});
03 - lists conditional/lists-cond-01-starting-setup/index.html
@@ -24,7 +24,7 @@
        No goals have been added yet - please start adding some!
      </p>
      <ul v-else>
        <li v-for="(goal, i) in goals">{{i}} - {{goal}}</li>
        <li v-for="(goal, idx) in goals" @click="removeGoal(idx)">{{idx}} - {{goal}}</li>
      </ul>
      <!-- <ul>
        <li v-for="(value, key) in {nome: 'cristiano', cognome: 'magro'}">{{key}}: {{value}}</li>