@@ -401,6 +401,7 @@ block observables-section-intro
401
401
It's easy with *!{_Observable}s* as we'll see.
402
402
403
403
### Search-by-name
404
+
404
405
We're going to add a *hero search* feature to the Tour of Heroes.
405
406
As the user types a name into a search box, we'll make repeated HTTP requests for heroes filtered by that name.
406
407
@@ -412,15 +413,17 @@ block observables-section-intro
412
413
The `!{_priv}http.get()` call in `HeroSearchService` is similar to the one
413
414
in the `HeroService`, although the URL now has a query string.
414
415
415
- <span if-docs="ts">A more important difference: we no longer call `toPromise`.
416
- Instead we return the *observable* from the the `htttp.get`,
417
- after chaining it to another RxJS operator, <code>map</code>,
418
- to extract heroes from the response data.
416
+ + ifDocsFor('ts' )
417
+ :marked
418
+ A more important difference: we no longer call `toPromise`.
419
+ Instead we return the *observable* from the the `htttp.get`,
420
+ after chaining it to another RxJS operator, <code>map</code>,
421
+ to extract heroes from the response data.
419
422
420
- RxJS operator chaining makes response processing easy and readable.
421
- See the [discuss below about operators](#rxjs-imports).
422
- </span>
423
+ RxJS operator chaining makes response processing easy and readable.
424
+ See the [discuss below about operators](#rxjs-imports).
423
425
426
+ :marked
424
427
### HeroSearchComponent
425
428
426
429
Let's create a new `HeroSearchComponent` that calls this new `HeroSearchService`.
@@ -513,6 +516,7 @@ block observable-transformers
513
516
a#rxjs-imports
514
517
:marked
515
518
### Import RxJS operators
519
+
516
520
Most RxJS operators are not included in Angular's base `Observable` implementation.
517
521
The base implementation includes only what Angular itself requires.
518
522
0 commit comments