Project component

We've already implemented all necessary changes to deal with the model, data, and state for our projects. Now, it's time to move on to the components that are required to display our projects and the tasks that belong to them.

Let's start by creating the project component using the Angular CLI:

ng generate component --spec false -ve none -cd onpush project/project

First, let's change the component class file located in src/app/project/project/project.component.ts by replacing its content with the following code:

import {ChangeDetectionStrategy, Component, Input, ViewEncapsulation} from '@angular/core';import {Project} from '../../model';@Component({  selector: 'mac-project',  templateUrl: './project.component.html', styleUrls: ...

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.