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 11// #docplaster
22// #docregion
3+ // #docregion hero-search-component
34import { Component , OnInit } from '@angular/core' ;
45import { Router } from '@angular/router' ;
56
@@ -13,6 +14,7 @@ import { HeroSearchComponent } from './hero-search.component';
1314 styleUrls : [ 'app/dashboard.component.css' ] ,
1415 directives : [ HeroSearchComponent ]
1516} )
17+ // #enddocregion hero-search-component
1618export class DashboardComponent implements OnInit {
1719
1820 heroes : Hero [ ] = [ ] ;
Original file line number Diff line number Diff line change @@ -492,9 +492,21 @@ block observables-section
492492 :marked
493493 We load them all at once by importing `rxjs-extensions` in `AppComponent`.
494494
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+
496509 :marked
497- Finally, we add the `HeroSearchComponent` to the bottom of the `DashboardComponent`.
498510 Run the app again, go to the *Dashboard*, and enter some text in the search box below the hero tiles.
499511 At some point it might look like this.
500512
You can’t perform that action at this time.
0 commit comments