Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public user: User;
- public roles: Role[];
- public organizations: Organization[];
- public ngOnInit() {
- this.user$ = this.userService.getUser(1).share();
- this.roles$ = this.roleService.getRoles().share();
- this.organizations$ = this.organizationService.getOrganizations().share();
- Observable.forkJoin([this.user$, this.roles$, this.organizations$]).subscribe(data => {
- this.user = data[0];
- this.roles = data[1];
- this.organizations = data[2];
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement