This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +11
-20
lines changed Expand file tree Collapse file tree 4 files changed +11
-20
lines changed Original file line number Diff line number Diff line change @@ -4,9 +4,8 @@ import { BrowserModule } from '@angular/platform-browser';
4
4
import { FormsModule } from '@angular/forms' ;
5
5
6
6
import { AppComponent } from './app.component' ;
7
-
7
+ import { HeroDetailComponent } from './hero-detail.component' ;
8
8
import { HeroesComponent } from './heroes.component' ;
9
-
10
9
import { HeroService } from './hero.service' ;
11
10
12
11
@NgModule ( {
@@ -16,6 +15,7 @@ import { HeroService } from './hero.service';
16
15
] ,
17
16
declarations : [
18
17
AppComponent ,
18
+ HeroDetailComponent ,
19
19
HeroesComponent
20
20
] ,
21
21
providers : [
Original file line number Diff line number Diff line change @@ -8,11 +8,9 @@ import { AppComponent } from './app.component';
8
8
// #docregion routing
9
9
import { routing } from './app.routing' ;
10
10
// #enddocregion routing
11
-
11
+ import { HeroDetailComponent } from './hero-detail.component' ;
12
12
import { HeroesComponent } from './heroes.component' ;
13
13
import { DashboardComponent } from './dashboard.component' ;
14
- import { HeroDetailComponent } from './hero-detail.component' ;
15
-
16
14
import { HeroService } from './hero.service' ;
17
15
// #docregion routing
18
16
@@ -26,11 +24,9 @@ import { HeroService } from './hero.service';
26
24
// #docregion dashboard, hero-detail
27
25
declarations : [
28
26
AppComponent ,
27
+ HeroDetailComponent ,
29
28
HeroesComponent ,
30
- DashboardComponent ,
31
- // #enddocregion dashboard
32
- HeroDetailComponent
33
- // #docregion dashboard
29
+ DashboardComponent
34
30
] ,
35
31
// #enddocregion dashboard, hero-detail
36
32
providers : [
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ import { InMemoryDataService } from './in-memory-data.service';
16
16
import { AppComponent } from './app.component' ;
17
17
import { routing } from './app.routing' ;
18
18
19
+ import { HeroDetailComponent } from './hero-detail.component' ;
19
20
import { HeroesComponent } from './heroes.component' ;
20
21
import { DashboardComponent } from './dashboard.component' ;
21
- import { HeroDetailComponent } from './hero-detail.component' ;
22
22
import { HeroService } from './hero.service' ;
23
23
// #enddocregion v1, v2
24
24
// #docregion search
@@ -36,9 +36,9 @@ import { HeroSearchComponent } from './hero-search.component';
36
36
// #docregion search
37
37
declarations : [
38
38
AppComponent ,
39
+ HeroDetailComponent ,
39
40
HeroesComponent ,
40
41
DashboardComponent ,
41
- HeroDetailComponent ,
42
42
// #enddocregion v1, v2
43
43
HeroSearchComponent
44
44
// #docregion v1, v2
Original file line number Diff line number Diff line change @@ -479,15 +479,10 @@ code-example(format='').
479
479
The colon (:) in the path indicates that `:id` is a placeholder to be filled with a specific hero `id`
480
480
when navigating to the `HeroDetailComponent`.
481
481
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' )
482
+ + ifDocsFor('dart' )
483
+ .l-sub-section
484
+ :marked
485
+ Remember to import the hero detail component before creating this route.
491
486
492
487
:marked
493
488
We're finished with the application routes.
You can’t perform that action at this time.
0 commit comments