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
dotansimha authored and DAB0mB committed Mar 23, 2017
1 parent f7ddefa commit 3d165ed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/chats/chats.ts
Expand Up @@ -29,7 +29,11 @@ export class ChatsPage implements OnInit {
}

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

findChats(): Observable<Chat[]> {
Expand Down

0 comments on commit 3d165ed

Please sign in to comment.