07 - development setup/vue-cli-01-a-new-vue-project/src/App.vue
@@ -12,7 +12,10 @@ :phone-number="friend.phone" :email-address="friend.email" :is-favorite="friend.isFavorite" @toggle-favorite="toggleFavoriteStatus"></friend-contact> @toggle-favorite="toggleFavoriteStatus" @delete="deleteContact" > </friend-contact> </ul> </section> </template> @@ -59,7 +62,12 @@ }; this.friends.push(newFriendContact); } }, deleteContact (friendId){ this.friends = this.friends.filter( (friend) => friend.id != friendId ); }, } };