Skip to content

Commit 53d5898

Browse files
dotansimhadarkbasic
authored andcommitted
Step 9.18: Subscribe to chats
1 parent 6c8162c commit 53d5898

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/pages/chats/chats.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ export class ChatsPage implements OnInit {
2929
}
3030

3131
ngOnInit() {
32-
this.chats = this.findChats();
32+
MeteorObservable.subscribe('chats').subscribe(() => {
33+
MeteorObservable.autorun().subscribe(() => {
34+
this.chats = this.findChats();
35+
});
36+
});
3337
}
3438

3539
findChats(): Observable<Chat[]> {

0 commit comments

Comments
 (0)