Skip to content

Commit

Permalink
Step 7.17: Subscribe to 'users'
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilkisiela authored and DAB0mB committed Dec 17, 2016
1 parent 18999f7 commit 87f691f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/imports/pages/chats/new-chat.component.ts
Expand Up @@ -31,8 +31,10 @@ export class NewChatComponent implements OnInit {
}

ngOnInit() {
MeteorObservable.autorun().zone().subscribe(() => {
this.users = this.findUsers().zone();
MeteorObservable.subscribe('users').subscribe(() => {
MeteorObservable.autorun().subscribe(() => {
this.users = this.findUsers().zone();
});
});
}

Expand Down

0 comments on commit 87f691f

Please sign in to comment.