docs: update examples region to match the description in the guide (#29259)
PR Close #29259
This commit is contained in:
parent
afd4a4ed4d
commit
ddb935fac7
|
@ -3,7 +3,9 @@
|
|||
<ul class="items">
|
||||
<li *ngFor="let hero of heroes$ | async">
|
||||
<!-- #docregion nav-to-detail -->
|
||||
<!-- #docregion link-parameters-array -->
|
||||
<a [routerLink]="['/hero', hero.id]">
|
||||
<!-- #enddocregion link-parameters-array -->
|
||||
<span class="badge">{{ hero.id }}</span>{{ hero.name }}
|
||||
</a>
|
||||
<!-- #enddocregion nav-to-detail -->
|
||||
|
|
|
@ -28,9 +28,3 @@ export class HeroListComponent implements OnInit {
|
|||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
||||
/* A link parameters array
|
||||
// #docregion link-parameters-array
|
||||
['/hero', hero.id] // { 15 }
|
||||
// #enddocregion link-parameters-array
|
||||
*/
|
||||
|
|
|
@ -1318,7 +1318,7 @@ After these steps, the file should look like this.
|
|||
|
||||
</code-example>
|
||||
|
||||
Next, update the `app.module.ts` file, removing `RouterModule.forRoot()` in
|
||||
Next, update the `app.module.ts` file, removing `RouterModule.forRoot` in
|
||||
the `imports` array.
|
||||
|
||||
<code-example path="router/src/app/app.module.2.ts" header="src/app/app.module.ts">
|
||||
|
@ -1734,7 +1734,7 @@ Accordingly, the _link parameters array_ has *two* items: the routing _path_ an
|
|||
`id` of the selected hero.
|
||||
|
||||
|
||||
<code-example path="router/src/app/heroes/hero-list/hero-list.component.1.ts" linenums="false" header="src/app/heroes/hero-list/hero-list.component.ts (link-parameters-array)" region="link-parameters-array">
|
||||
<code-example path="router/src/app/heroes/hero-list/hero-list.component.1.html" linenums="false" header="src/app/heroes/hero-list/hero-list.component.html (link-parameters-array)" region="link-parameters-array">
|
||||
|
||||
</code-example>
|
||||
|
||||
|
@ -2029,7 +2029,7 @@ When navigating to the `HeroDetailComponent` you specified the _required_ `id` o
|
|||
*route parameter* and made it the second item of the [_link parameters array_](#link-parameters-array).
|
||||
|
||||
|
||||
<code-example path="router/src/app/heroes/hero-list/hero-list.component.1.ts" linenums="false" header="src/app/heroes/hero-list/hero-list.component.ts (link-parameters-array)" region="link-parameters-array">
|
||||
<code-example path="router/src/app/heroes/hero-list/hero-list.component.1.html" linenums="false" header="src/app/heroes/hero-list/hero-list.component.html (link-parameters-array)" region="link-parameters-array">
|
||||
|
||||
</code-example>
|
||||
|
||||
|
|
Loading…
Reference in New Issue