Remove from Array

PHOTO EMBED

Wed Dec 22 2021 18:32:22 GMT+0000 (UTC)

Saved by @mmerkley #html

// The html
<li v-for="(goal, index) in goals" @click="removeGoal(index)">{{ goal }} - {{ index }}</li>

// the method
removeGoal(index) {
  this.goals.splice(index, 1);
}
content_copyCOPY