Permalink
Browse files

Step 4.21: Implement remove chat with the Collection

  • Loading branch information...
darkbasic committed May 21, 2017
1 parent 9e52e87 commit 81f47204e8001395ccd69b9d2a7e04c1856ab84a
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/pages/chats/chats.ts
View
@@ -31,13 +31,7 @@ export class ChatsPage implements OnInit {
}
removeChat(chat: Chat): void {
this.chats = this.chats.map((chatsArray: Chat[]) => {
const chatIndex = chatsArray.indexOf(chat);
if (chatIndex !== -1) {
chatsArray.splice(chatIndex, 1);
}
return chatsArray;
Chats.remove({_id: chat._id}).subscribe(() => {
});
}
}

0 comments on commit 81f4720

Please sign in to comment.