From e766f666bd30c68dd3c486af59770ce04af76f11 Mon Sep 17 00:00:00 2001 From: Stephen Fox Date: Fri, 17 Jun 2016 17:23:35 -0600 Subject: [PATCH] docs(http): Small typo fix in sentence reference to items: Observable Ward tacked on router: ngDestroy -> ngOnDestroy closes #1690 --- public/docs/ts/latest/guide/router.jade | 2 +- public/docs/ts/latest/guide/server-communication.jade | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/docs/ts/latest/guide/router.jade b/public/docs/ts/latest/guide/router.jade index 9b7e260093..c3d6d3a7ec 100644 --- a/public/docs/ts/latest/guide/router.jade +++ b/public/docs/ts/latest/guide/router.jade @@ -739,7 +739,7 @@ h4#snapshot Snapshot: 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 diff --git a/public/docs/ts/latest/guide/server-communication.jade b/public/docs/ts/latest/guide/server-communication.jade index 2ce647af77..602cf6c741 100644 --- a/public/docs/ts/latest/guide/server-communication.jade +++ b/public/docs/ts/latest/guide/server-communication.jade @@ -540,7 +540,7 @@ block wikipedia-jsonp+ The component presents an `` 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`). 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.