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 Feb 26, 2017
1 parent 2d4c777 commit 984f6e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/new-chat/new-chat.ts
Original file line number Diff line number Diff line change
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 984f6e8

Please sign in to comment.