This repository was archived by the owner on Dec 4, 2017. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 1
1
// #docplaster
2
2
// #docregion
3
+ // #docregion hero-search-component
3
4
import { Component , OnInit } from '@angular/core' ;
4
5
import { Router } from '@angular/router' ;
5
6
@@ -13,6 +14,7 @@ import { HeroSearchComponent } from './hero-search.component';
13
14
styleUrls : [ 'app/dashboard.component.css' ] ,
14
15
directives : [ HeroSearchComponent ]
15
16
} )
17
+ // #enddocregion hero-search-component
16
18
export class DashboardComponent implements OnInit {
17
19
18
20
heroes : Hero [ ] = [ ] ;
Original file line number Diff line number Diff line change @@ -492,9 +492,21 @@ block observables-section
492
492
:marked
493
493
We load them all at once by importing `rxjs-extensions` in `AppComponent`.
494
494
495
- + makeExample('toh-6/ts/app/app.component.ts' , 'rxjs-extensions' , 'app/app/app.component.ts' )( format ="." )
495
+ + makeExample('toh-6/ts/app/app.component.ts' , 'rxjs-extensions' , 'app/app.component.ts' )( format ="." )
496
+
497
+ :marked
498
+ ### Adding the search component to the dashboard
499
+
500
+ We add the `HeroSearchComponent` to the bottom of the `DashboardComponent` template.
501
+
502
+ + makeExample('toh-6/ts/app/dashboard.component.html' , null , 'dashboard.component.html' )
503
+
504
+ :marked
505
+ And finally, we import the `HeroSearchComponent` and add it to the `directives` array.
506
+
507
+ + makeExcerpt('app/dashboard.component.ts' , 'hero-search-component' )
508
+
496
509
:marked
497
- Finally, we add the `HeroSearchComponent` to the bottom of the `DashboardComponent`.
498
510
Run the app again, go to the *Dashboard*, and enter some text in the search box below the hero tiles.
499
511
At some point it might look like this.
500
512
You can’t perform that action at this time.
0 commit comments