Skip to content

Commit

Permalink
docs: add HeroService to code tabs and fix headers
Browse files Browse the repository at this point in the history
  • Loading branch information
kapunahelewong committed Feb 28, 2018
1 parent c82cef8 commit 60389ea
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions aio/content/tutorial/toh-pt5.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ When you’re done, users will be able to navigate the app like this:

</figure>

## Add the _AppRoutingModule_
## Add the `AppRoutingModule`

An Angular best practice is to load and configure the router in a separate, top-level module
that is dedicated to routing and imported by the root `AppModule`.
Expand Down Expand Up @@ -138,7 +138,7 @@ You should see the familiar heroes master/detail view.

{@a routerlink}

## Add a navigation link (_routerLink_)
## Add a navigation link (`routerLink`)

Users shouldn't have to paste a route URL into the address bar.
They should be able to click a link to navigate.
Expand Down Expand Up @@ -283,7 +283,7 @@ The user should be able to get to these details in three ways.
In this section, you'll enable navigation to the `HeroDetailsComponent`
and liberate it from the `HeroesComponent`.

### Delete _hero details_ from _HeroesComponent_
### Delete _hero details_ from `HeroesComponent`

When the user clicks a hero item in the `HeroesComponent`,
the app should navigate to the `HeroDetailComponent`,
Expand Down Expand Up @@ -325,7 +325,7 @@ At this point, all application routes are in place.
title="src/app/app-routing.module.ts (all routes)">
</code-example>

### _DashboardComponent_ hero links
### `DashboardComponent` hero links

The `DashboardComponent` hero links do nothing at the moment.

Expand All @@ -343,7 +343,7 @@ to insert the current interation's `hero.id` into each
[`routerLink`](#routerlink).

{@a heroes-component-links}
### _HeroesComponent_ hero links
### `HeroesComponent` hero links

The hero items in the `HeroesComponent` are `<li>` elements whose click events
are bound to the component's `onSelect()` method.
Expand Down Expand Up @@ -446,7 +446,7 @@ The browser refreshes and the app crashes with a compiler error.
`HeroService` doesn't have a `getHero()` method.
Add it now.

### Add *HeroService.getHero()*
### Add `HeroService.getHero()`

Open `HeroService` and add this `getHero()` method

Expand Down Expand Up @@ -518,7 +518,7 @@ Here are the code files discussed on this page and your app should look like thi

{@a approutingmodule}
{@a appmodule}
#### _AppRoutingModule_ and _AppModule_
#### `AppRoutingModule`, `AppModule`, and `HeroService`

<code-tabs>
<code-pane
Expand All @@ -529,10 +529,14 @@ Here are the code files discussed on this page and your app should look like thi
title="src/app/app.module.ts"
path="toh-pt5/src/app/app.module.ts">
</code-pane>
<code-pane
title="src/app/hero.service.ts"
path="toh-pt5/src/app/hero.service.ts">
</code-pane>
</code-tabs>

{@a appcomponent}
#### _AppComponent_
#### `AppComponent`

<code-tabs>
<code-pane
Expand All @@ -547,7 +551,7 @@ Here are the code files discussed on this page and your app should look like thi
</code-tabs>

{@a dashboardcomponent}
#### _DashboardComponent_
#### `DashboardComponent`

<code-tabs>
<code-pane
Expand All @@ -564,7 +568,7 @@ Here are the code files discussed on this page and your app should look like thi
</code-tabs>

{@a heroescomponent}
#### _HeroesComponent_
#### `HeroesComponent`
<code-tabs>
<code-pane
title="src/app/heroes/heroes.component.html" path="toh-pt5/src/app/heroes/heroes.component.html">
Expand All @@ -582,7 +586,7 @@ Here are the code files discussed on this page and your app should look like thi
</code-tabs>

{@a herodetailcomponent}
#### _HeroDetailComponent_
#### `HeroDetailComponent`

<code-tabs>
<code-pane
Expand Down

0 comments on commit 60389ea

Please sign in to comment.