Permalink
Browse files

Step 4.22: Implement remove chat with the Collection

  • Loading branch information...
darkbasic committed May 21, 2017
1 parent 3e87609 commit f4b31d871d17035e04b2ce6809a372a5141166be
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 f4b31d8

Please sign in to comment.