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 darkbasic committed Oct 16, 2017
1 parent 6c8162c commit 53d5898
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/pages/chats/chats.ts
Original file line number Diff line number Diff line change
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 53d5898

Please sign in to comment.