Observables – forkJoin

Our work with the Board List screen is not quite complete. Along with a set of sizes that are related to a board, each board also has a set of board types. Remember that a board can be classified as either a Wave board, a Freestyle board, or a Slalom board, or a combination of all three. This introduces another one-to-many relationship between a board and its types, along with the existing one-to-many board to board sizes relationship. We already have a REST endpoint that will return the types for each board, and can therefore replicate our concatMap functionality to retrieve the list of board types in a similar manner, as follows:

this.boardService.getBoardsList().subscribe((result: IBoardExtended[]) => { let boardSizes ...

Get Mastering TypeScript 3 - Third Edition 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.