Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

Commit b122c04

Browse files
fix(toh-5): Fixed issues in tutorial flow
The HeroDetailComponent should be in the module declarations from the beginning.
1 parent 7dc18f8 commit b122c04

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

public/docs/_examples/toh-5/ts/app/app.module.1.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { FormsModule } from '@angular/forms';
55

66
import { AppComponent } from './app.component';
77

8+
import { HeroDetailComponent } from './hero-detail.component';
89
import { HeroesComponent } from './heroes.component';
910

1011
import { HeroService } from './hero.service';
@@ -16,6 +17,7 @@ import { HeroService } from './hero.service';
1617
],
1718
declarations: [
1819
AppComponent,
20+
HeroDetailComponent,
1921
HeroesComponent
2022
],
2123
providers: [

public/docs/_examples/toh-5/ts/app/app.module.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import { AppComponent } from './app.component';
99
import { routing } from './app.routing';
1010
// #enddocregion routing
1111

12+
import { HeroDetailComponent } from './hero-detail.component';
1213
import { HeroesComponent } from './heroes.component';
1314
import { DashboardComponent } from './dashboard.component';
14-
import { HeroDetailComponent } from './hero-detail.component';
1515

1616
import { HeroService } from './hero.service';
1717
// #docregion routing
@@ -26,10 +26,10 @@ import { HeroService } from './hero.service';
2626
// #docregion dashboard, hero-detail
2727
declarations: [
2828
AppComponent,
29+
HeroDetailComponent,
2930
HeroesComponent,
30-
DashboardComponent,
31+
DashboardComponent
3132
// #enddocregion dashboard
32-
HeroDetailComponent
3333
// #docregion dashboard
3434
],
3535
// #enddocregion dashboard, hero-detail

public/docs/ts/latest/tutorial/toh-pt5.jade

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -479,16 +479,6 @@ code-example(format='').
479479
The colon (:) in the path indicates that `:id` is a placeholder to be filled with a specific hero `id`
480480
when navigating to the `HeroDetailComponent`.
481481

482-
.l-sub-section
483-
:marked
484-
Remember to import the hero detail component before creating this route.
485-
486-
+ifDocsFor('ts|js')
487-
:marked
488-
Add the `HeroDetailComponent` to our root NgModule's `declarations`.
489-
490-
+makeExcerpt('app/app.module.ts', 'hero-detail')
491-
492482
:marked
493483
We're finished with the application routes.
494484

0 commit comments

Comments
 (0)