Skip to content

Commit

Permalink
Step 9.18: Subscribe to chats
Browse files Browse the repository at this point in the history
  • Loading branch information
DAB0mB committed Feb 13, 2017
1 parent 3b45003 commit b5c1c60
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/imports/pages/chats/chats.ts
Expand Up @@ -26,7 +26,11 @@ export class ChatsPage implements OnInit {
}

ngOnInit() {
this.chats = this.findChats();
MeteorObservable.subscribe('chats').subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.chats = this.findChats();
});
});
}

addChat(): void {
Expand Down

0 comments on commit b5c1c60

Please sign in to comment.