Integrating the user area component

Now, it's time to incorporate our user component into our main layout. For this, we're going to modify our root application component, which is acting as our outermost container component.

Let's open the component class of our app component located in src/app/app.component.ts and apply the following changes:

import {map} from 'rxjs/operators';import {UserService} from './user/user.service';import {Project, Task, User} from './model';…export class AppComponent {  openTasksCount: Observable<number>;  user: Observable<User>;  projects: Observable<Project[]>;  selectedProject: Observable<Project>;  constructor(taskListService: TaskService,              userService: UserService,              private projectService: ProjectService) { this.openTasksCount ...

Get Mastering Angular Components now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.