docs: update examples region to match the description in the guide (#29259)

PR Close #29259
This commit is contained in:
Vani 2019-03-12 11:33:48 -07:00 committed by Jason Aden
parent afd4a4ed4d
commit ddb935fac7
3 changed files with 5 additions and 9 deletions

View File

@ -3,7 +3,9 @@
<ul class="items"> <ul class="items">
<li *ngFor="let hero of heroes$ | async"> <li *ngFor="let hero of heroes$ | async">
<!-- #docregion nav-to-detail --> <!-- #docregion nav-to-detail -->
<!-- #docregion link-parameters-array -->
<a [routerLink]="['/hero', hero.id]"> <a [routerLink]="['/hero', hero.id]">
<!-- #enddocregion link-parameters-array -->
<span class="badge">{{ hero.id }}</span>{{ hero.name }} <span class="badge">{{ hero.id }}</span>{{ hero.name }}
</a> </a>
<!-- #enddocregion nav-to-detail --> <!-- #enddocregion nav-to-detail -->

View File

@ -28,9 +28,3 @@ export class HeroListComponent implements OnInit {
} }
} }
// #enddocregion // #enddocregion
/* A link parameters array
// #docregion link-parameters-array
['/hero', hero.id] // { 15 }
// #enddocregion link-parameters-array
*/

View File

@ -1318,7 +1318,7 @@ After these steps, the file should look like this.
</code-example> </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. the `imports` array.
<code-example path="router/src/app/app.module.2.ts" header="src/app/app.module.ts"> <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. `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> </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). *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> </code-example>