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

Commit a258420

Browse files
chalinfilipesilva
authored andcommitted
docs(toh6): fix if-docs (#3116)
Fix: we can’t have a markdown `<span>` ranging over multiple paragraphs; instead we use the `+ifDocsFor()` mixin.
1 parent 276867e commit a258420

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

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

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,6 +401,7 @@ block observables-section-intro
401401
It's easy with *!{_Observable}s* as we'll see.
402402

403403
### Search-by-name
404+
404405
We're going to add a *hero search* feature to the Tour of Heroes.
405406
As the user types a name into a search box, we'll make repeated HTTP requests for heroes filtered by that name.
406407

@@ -412,15 +413,17 @@ block observables-section-intro
412413
The `!{_priv}http.get()` call in `HeroSearchService` is similar to the one
413414
in the `HeroService`, although the URL now has a query string.
414415

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.
419422

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).
423425

426+
:marked
424427
### HeroSearchComponent
425428

426429
Let's create a new `HeroSearchComponent` that calls this new `HeroSearchService`.
@@ -513,6 +516,7 @@ block observable-transformers
513516
a#rxjs-imports
514517
:marked
515518
### Import RxJS operators
519+
516520
Most RxJS operators are not included in Angular's base `Observable` implementation.
517521
The base implementation includes only what Angular itself requires.
518522

0 commit comments

Comments
 (0)