docs: update example hero ID (#46304)

The hero ID "11" does not correspond to any hero from the example mock heroes list described at https://angular.io/tutorial/toh-pt2#create-mock-heroes. ID 12 seems to be the more fitting ID to get the hero with name "Dr. Nice".

PR Close #46304
This commit is contained in:
sten-bone
2022-06-08 10:12:06 -05:00
committed by Jessica Janiuk
parent ef5cba3df7
commit d6ee9f29e6
+2 -2
View File
@@ -319,7 +319,7 @@ Here's the class after pruning away the dead code.
Previously, the parent `HeroesComponent` set the `HeroDetailComponent.hero` property and the `HeroDetailComponent` displayed the hero.
`HeroesComponent` doesn't do that anymore.
Now the router creates the `HeroDetailComponent` in response to a URL such as `~/detail/11`.
Now the router creates the `HeroDetailComponent` in response to a URL such as `~/detail/12`.
The `HeroDetailComponent` needs a new way to obtain the hero-to-display.
This section explains the following:
@@ -389,7 +389,7 @@ You'll be able to re-implement `getHero()` as a real `Http` request without havi
The browser refreshes and the application is working again.
You can click a hero in the dashboard or in the heroes list and navigate to that hero's detail view.
If you paste `localhost:4200/detail/11` in the browser address bar, the router navigates to the detail view for the hero with `id: 11`, "Dr Nice".
If you paste `localhost:4200/detail/12` in the browser address bar, the router navigates to the detail view for the hero with `id: 12`, "Dr Nice".
<a id="goback"></a>