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 dotansimha committed Nov 27, 2016
1 parent 850f9b2 commit 5489fed
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 5489fed

Please sign in to comment.