docs: clarification of hero selection in routing section (#25634)
PR Close #25634
This commit is contained in:
parent
42072c4d0d
commit
9ee29ecdd4
|
@ -213,8 +213,7 @@ The _class_ is similar to the `HeroesComponent` class.
|
||||||
* The constructor expects Angular to inject the `HeroService` into a private `heroService` property.
|
* The constructor expects Angular to inject the `HeroService` into a private `heroService` property.
|
||||||
* The `ngOnInit()` lifecycle hook calls `getHeroes`.
|
* The `ngOnInit()` lifecycle hook calls `getHeroes`.
|
||||||
|
|
||||||
This `getHeroes` reduces the number of heroes displayed to four
|
This `getHeroes` returns the sliced list of heroes at positions 1 and 5, returning only four of the Top Heroes (2nd, 3rd, 4th, and 5th).
|
||||||
(2nd, 3rd, 4th, and 5th).
|
|
||||||
|
|
||||||
<code-example path="toh-pt5/src/app/dashboard/dashboard.component.ts" region="getHeroes">
|
<code-example path="toh-pt5/src/app/dashboard/dashboard.component.ts" region="getHeroes">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
Loading…
Reference in New Issue