The BoardList component

Let's start our application updates by creating and integrating a board-list component that will display the list of all boards that are available. This component will query the /api/boards endpoint for data, and will serve as the main page for our site. This BoardListComponent can be created by using the Angular CLI as follows:

ng generate component board-list --skip-import  

This command will generate a /src/app/board-list directory, and also create the .ts, .html, .css, and .spec.ts files for our component. We will need to register this BoardListComponent as a module in the app.module.ts file as follows:

@NgModule({ declarations: [ ... existing components ... BoardListComponent ], imports: [ ... existing code ... ...

Get Mastering TypeScript 3 - Third Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.