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

fix(toh-5): Fixed issues in tutorial flow #2137

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions public/docs/_examples/toh-5/ts/app/app.module.1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';

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

import { HeroDetailComponent } from './hero-detail.component';
import { HeroesComponent } from './heroes.component';

import { HeroService } from './hero.service';

@NgModule({
Expand All @@ -16,6 +15,7 @@ import { HeroService } from './hero.service';
],
declarations: [
AppComponent,
HeroDetailComponent,
HeroesComponent
],
providers: [
Expand Down
10 changes: 3 additions & 7 deletions public/docs/_examples/toh-5/ts/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@ import { AppComponent } from './app.component';
// #docregion routing
import { routing } from './app.routing';
// #enddocregion routing

import { HeroDetailComponent } from './hero-detail.component';
import { HeroesComponent } from './heroes.component';
import { DashboardComponent } from './dashboard.component';
import { HeroDetailComponent } from './hero-detail.component';

import { HeroService } from './hero.service';
// #docregion routing

Expand All @@ -26,11 +24,9 @@ import { HeroService } from './hero.service';
// #docregion dashboard, hero-detail
declarations: [
AppComponent,
HeroDetailComponent,
HeroesComponent,
DashboardComponent,
// #enddocregion dashboard
HeroDetailComponent
// #docregion dashboard
DashboardComponent
],
// #enddocregion dashboard, hero-detail
providers: [
Expand Down
4 changes: 2 additions & 2 deletions public/docs/_examples/toh-6/ts/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ import { InMemoryDataService } from './in-memory-data.service';
import { AppComponent } from './app.component';
import { routing } from './app.routing';

import { HeroDetailComponent } from './hero-detail.component';
import { HeroesComponent } from './heroes.component';
import { DashboardComponent } from './dashboard.component';
import { HeroDetailComponent } from './hero-detail.component';
import { HeroService } from './hero.service';
// #enddocregion v1, v2
// #docregion search
Expand All @@ -36,9 +36,9 @@ import { HeroSearchComponent } from './hero-search.component';
// #docregion search
declarations: [
AppComponent,
HeroDetailComponent,
HeroesComponent,
DashboardComponent,
HeroDetailComponent,
// #enddocregion v1, v2
HeroSearchComponent
// #docregion v1, v2
Expand Down
13 changes: 4 additions & 9 deletions public/docs/ts/latest/tutorial/toh-pt5.jade
Original file line number Diff line number Diff line change
Expand Up @@ -479,15 +479,10 @@ code-example(format='').
The colon (:) in the path indicates that `:id` is a placeholder to be filled with a specific hero `id`
when navigating to the `HeroDetailComponent`.

.l-sub-section
:marked
Remember to import the hero detail component before creating this route.

+ifDocsFor('ts|js')
:marked
Add the `HeroDetailComponent` to our root NgModule's `declarations`.

+makeExcerpt('app/app.module.ts', 'hero-detail')
+ifDocsFor('dart')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 482 to 484 are relevant for Dart, please keep them and: just before this line, insert:

+ifDocsFor('dart')

and then indent lines 482 to 484.

.l-sub-section
:marked
Remember to import the hero detail component before creating this route.

:marked
We're finished with the application routes.
Expand Down