docs(http): Small typo fix in sentence reference to items: Observable

Ward tacked on router: ngDestroy -> ngOnDestroy
closes #1690
This commit is contained in:
Stephen Fox 2016-06-17 17:23:35 -06:00 committed by Ward Bell
parent e4c5fe32e7
commit e766f666bd
2 changed files with 2 additions and 2 deletions

View File

@ -739,7 +739,7 @@ h4#snapshot <i>Snapshot</i>: the no-observable alternative
be re-used. We'll always re-create the component each time we navigate to it.
The router offers a *Snapshot* alternative that gives us the initial value of the route parameters.
We don't need to subscribe. We don't have to unsubscribe in `ngDestroy`.
We don't need to subscribe. We don't have to unsubscribe in `ngOnDestroy`.
It's much simpler to write and read:
+makeExample('router/ts/app/heroes/hero-detail.component.2.ts','snapshot')(format=".")
.l-sub-section

View File

@ -540,7 +540,7 @@ block wikipedia-jsonp+
The component presents an `<input>` element *search box* to gather search terms from the user.
and calls a `search(term)` method after each `keyup` event.
The `search(term)` method delegates to our `WikipediaService` which returns an observable array of string results (`Observable<string[]`).
The `search(term)` method delegates to our `WikipediaService` which returns an observable array of string results (`Observable<string[]>`).
Instead of subscribing to the observable inside the component as we did in the `HeroListComponent`,
we forward the observable result to the template (via `items`) where the [async pipe](pipes.html#async-pipe)
in the `ngFor` handles the subscription.