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

Commit 4507589

Browse files
Foxandxsswardbell
authored andcommitted
docs(toh): add explanation for using the search box
closes #2002
1 parent 92239a8 commit 4507589

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

public/docs/_examples/toh-6/ts/app/dashboard.component.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// #docplaster
22
// #docregion
3+
// #docregion hero-search-component
34
import { Component, OnInit } from '@angular/core';
45
import { 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
1618
export class DashboardComponent implements OnInit {
1719

1820
heroes: Hero[] = [];

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

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)