Select Page

Navigating back to the list component T

The HeroDetailComponent has a “Back” button wired to its gotoHeroes method that navigates imperatively back to the HeroListComponent. The router navigate method takes the same one-item link parameters array that you can bind to a [routerLink] directive. It...

ParamMap API T

The paramMap processing is a bit tricky. When the map changes, you get() the id parameter from the changed parameters. Then you tell the HeroService to fetch the hero with that id and return the result of the HeroService request. You might think to use the...