Skip to content

Commit

Permalink
Step 7.18: Subscribe to 'users'
Browse files Browse the repository at this point in the history
  • Loading branch information
dotansimha authored and DAB0mB committed Dec 24, 2016
1 parent e534c8f commit 74cdb1e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/new-chat/new-chat.ts
Expand Up @@ -21,8 +21,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 74cdb1e

Please sign in to comment.