[Vuejs]-Vue.js Remove a Nested Object from Array

2👍

this.locations is an array of locations. The array does not contain an events property; individual elements of the array do. You need to pass the location as well as the event to your deleteEvent:

<a href="javascript:;" @click="deleteEvent(location, event)">

and

deleteEvent(location, event) {
    location.events.$remove(event);
    console.log(event);
}
👤Roy J

Leave a comment