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 +2
-2
lines changed
public/docs/ts/latest/guide Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -739,7 +739,7 @@ h4#snapshot <i>Snapshot</i>: the no-observable alternative
739
739
be re-used. We'll always re-create the component each time we navigate to it.
740
740
741
741
The router offers a *Snapshot* alternative that gives us the initial value of the route parameters.
742
- We don't need to subscribe. We don't have to unsubscribe in `ngDestroy `.
742
+ We don't need to subscribe. We don't have to unsubscribe in `ngOnDestroy `.
743
743
It's much simpler to write and read:
744
744
+ makeExample('router/ts/app/heroes/hero-detail.component.2.ts' ,'snapshot' )( format ="." )
745
745
.l-sub-section
Original file line number Diff line number Diff line change @@ -540,7 +540,7 @@ block wikipedia-jsonp+
540
540
The component presents an `<input>` element *search box* to gather search terms from the user.
541
541
and calls a `search(term)` method after each `keyup` event.
542
542
543
- The `search(term)` method delegates to our `WikipediaService` which returns an observable array of string results (`Observable<string[]`).
543
+ The `search(term)` method delegates to our `WikipediaService` which returns an observable array of string results (`Observable<string[]> `).
544
544
Instead of subscribing to the observable inside the component as we did in the `HeroListComponent`,
545
545
we forward the observable result to the template (via `items`) where the [async pipe](pipes.html#async-pipe)
546
546
in the `ngFor` handles the subscription.
You can’t perform that action at this time.
0 commit comments