+
Top Heroes
+
diff --git a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css
index 6a860b871d..a9f3910419 100644
--- a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css
+++ b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css
@@ -1,24 +1,18 @@
/* HeroDetailComponent's private CSS styles */
label {
- display: inline-block;
- width: 3em;
- margin: .5em 0;
- color: #607D8B;
+ color: #435960;
font-weight: bold;
}
input {
- height: 2em;
font-size: 1em;
- padding-left: .4em;
+ padding: .5rem;
}
button {
margin-top: 20px;
- font-family: Arial, sans-serif;
background-color: #eee;
- border: none;
- padding: 5px 10px;
+ padding: 1rem;
border-radius: 4px;
- cursor: pointer;
+ font-size: 1rem;
}
button:hover {
background-color: #cfd8dc;
diff --git a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html
index 5f7b1d46a3..2e1c4613b2 100644
--- a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html
+++ b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html
@@ -2,9 +2,8 @@
{{hero.name | uppercase}} Details
id: {{hero.id}}
-
+
+
diff --git a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css b/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css
index 2ad3fefb31..d54f7a290c 100644
--- a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css
+++ b/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css
@@ -8,29 +8,32 @@
.heroes li {
position: relative;
cursor: pointer;
- background-color: #EEE;
- margin: .5em;
- padding: .3em 0;
- height: 1.6em;
- border-radius: 4px;
}
.heroes li:hover {
- color: #607D8B;
- background-color: #DDD;
left: .1em;
}
.heroes a {
color: #333;
text-decoration: none;
- position: relative;
+ background-color: #EEE;
+ margin: .5em;
+ padding: .3em 0;
+ height: 1.6em;
+ border-radius: 4px;
display: block;
- width: 250px;
+ width: 100%;
}
.heroes a:hover {
- color:#607D8B;
+ color: #2c3a41;
+ background-color: #e6e6e6;
+}
+
+.heroes a:active {
+ background-color: #525252;
+ color: #fafafa;
}
.heroes .badge {
diff --git a/aio/content/examples/toh-pt5/src/app/messages/messages.component.css b/aio/content/examples/toh-pt5/src/app/messages/messages.component.css
index 08585dcbaf..9a914ecbc2 100644
--- a/aio/content/examples/toh-pt5/src/app/messages/messages.component.css
+++ b/aio/content/examples/toh-pt5/src/app/messages/messages.component.css
@@ -1,20 +1,19 @@
/* MessagesComponent's private CSS styles */
h2 {
- color: red;
+ color: #A80000;
font-family: Arial, Helvetica, sans-serif;
font-weight: lighter;
}
-button.clear {
- font-family: Arial, sans-serif;
+.clear {
color: #333;
background-color: #eee;
margin-bottom: 12px;
- border: none;
- padding: 5px 10px;
+ padding: 1rem;
border-radius: 4px;
- cursor: pointer;
+ font-size: 1rem;
}
-button:hover {
- background-color: #cfd8dc;
+.clear:hover {
+ color: #fff;
+ background-color: #42545C;
}
diff --git a/aio/content/examples/toh-pt5/src/app/messages/messages.component.html b/aio/content/examples/toh-pt5/src/app/messages/messages.component.html
index 8e86f5247d..75259e307e 100644
--- a/aio/content/examples/toh-pt5/src/app/messages/messages.component.html
+++ b/aio/content/examples/toh-pt5/src/app/messages/messages.component.html
@@ -2,7 +2,7 @@
Messages
+ (click)="messageService.clear()">Clear messages
{{message}}
diff --git a/aio/content/navigation.json b/aio/content/navigation.json
index c49e464b7a..bb961c45cc 100644
--- a/aio/content/navigation.json
+++ b/aio/content/navigation.json
@@ -567,7 +567,7 @@
},
{
"url": "tutorial/toh-pt5",
- "title": "5. Add In-app Navigation",
+ "title": "5. Add Navigation",
"tooltip": "Part 5: Add the Angular router and navigate among the views."
},
{
diff --git a/aio/content/tutorial/toh-pt5.md b/aio/content/tutorial/toh-pt5.md
index 818d572100..a3f3508160 100644
--- a/aio/content/tutorial/toh-pt5.md
+++ b/aio/content/tutorial/toh-pt5.md
@@ -1,4 +1,4 @@
-# Add in-app navigation with routing
+# Add navigation with routing
There are new requirements for the Tour of Heroes app:
@@ -9,11 +9,11 @@ There are new requirements for the Tour of Heroes app:
@@ -48,7 +48,7 @@ Replace it with the following:
-First, the `app-routing.module.ts` file imports `RouterModule` and `Routes` so the app can have routing functionality. The next import, `HeroesComponent`, will give the Router somewhere to go once you configure the routes.
+First, the `app-routing.module.ts` file imports `RouterModule` and `Routes` so the application can have routing functionality. The next import, `HeroesComponent`, will give the Router somewhere to go once you configure the routes.
Notice that the `CommonModule` references and `declarations` array are unnecessary, so are no
longer part of `AppRoutingModule`. The following sections explain the rest of the `AppRoutingModule` in more detail.
@@ -105,7 +105,7 @@ Open the `AppComponent` template and replace the `
` element with a `
-The `AppComponent` template no longer needs `` because the app will only display the `HeroesComponent` when the user navigates to it.
+The `AppComponent` template no longer needs `` because the application will only display the `HeroesComponent` when the user navigates to it.
The `` tells the router where to display routed views.
@@ -124,7 +124,7 @@ You should still be running with this CLI command.
ng serve
-The browser should refresh and display the app title but not the list of heroes.
+The browser should refresh and display the application title but not the list of heroes.
Look at the browser's address bar.
The URL ends in `/`.
@@ -153,7 +153,7 @@ The `routerLink` is the selector for the [`RouterLink` directive](/api/router/Ro
that turns user clicks into router navigations.
It's another of the public directives in the `RouterModule`.
-The browser refreshes and displays the app title and heroes link,
+The browser refreshes and displays the application title and heroes link,
but not the heroes list.
Click the link.
@@ -228,11 +228,11 @@ Add a route to the `routes` array that matches a path to the `DashboardComponent
### Add a default route
-When the app starts, the browser's address bar points to the web site's root.
+When the application starts, the browser's address bar points to the web site's root.
That doesn't match any existing route so the router doesn't navigate anywhere.
The space below the `` is blank.
-To make the app navigate to the dashboard automatically, add the following
+To make the application navigate to the dashboard automatically, add the following
route to the `routes` array.
@@ -274,7 +274,7 @@ and liberate it from the `HeroesComponent`.
### Delete _hero details_ from `HeroesComponent`
When the user clicks a hero item in the `HeroesComponent`,
-the app should navigate to the `HeroDetailComponent`,
+the application should navigate to the `HeroDetailComponent`,
replacing the heroes list view with the hero detail view.
The heroes list view should no longer show hero details as it does now.
@@ -409,7 +409,7 @@ Route parameters are always strings.
The JavaScript (+) operator converts the string to a number,
which is what a hero `id` should be.
-The browser refreshes and the app crashes with a compiler error.
+The browser refreshes and the application crashes with a compiler error.
`HeroService` doesn't have a `getHero()` method.
Add it now.
@@ -435,7 +435,7 @@ without having to change the `HeroDetailComponent` that calls it.
#### Try it
-The browser refreshes and the app is working again.
+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,
@@ -566,7 +566,7 @@ Here are the code files discussed on this page.
* You added the Angular router to navigate among different components.
* You turned the `AppComponent` into a navigation shell with `` links and a ``.
* You configured the router in an `AppRoutingModule`
-* You defined simple routes, a redirect route, and a parameterized route.
+* You defined routes, a redirect route, and a parameterized route.
* You used the `routerLink` directive in anchor elements.
* You refactored a tightly-coupled master/detail view into a routed detail view.
* You used router link parameters to navigate to the detail view of a user-selected hero.