From 2560787481f71d9517b8d00bebde96ed7143b1e2 Mon Sep 17 00:00:00 2001 From: Kapunahele Wong Date: Wed, 8 Mar 2017 11:51:56 -0500 Subject: [PATCH] docs(http-client): edit copy and true TOC to doc shape --- .../ts/src/app/toh/hero.service.ts | 2 +- .../ts/latest/guide/server-communication.jade | 193 +++++++++++------- 2 files changed, 117 insertions(+), 78 deletions(-) diff --git a/public/docs/_examples/server-communication/ts/src/app/toh/hero.service.ts b/public/docs/_examples/server-communication/ts/src/app/toh/hero.service.ts index 804883d0e8..5af142ace3 100644 --- a/public/docs/_examples/server-communication/ts/src/app/toh/hero.service.ts +++ b/public/docs/_examples/server-communication/ts/src/app/toh/hero.service.ts @@ -57,7 +57,7 @@ export class HeroService { // #docregion error-handling private handleError (error: Response | any) { - // In a real world app, we might use a remote logging infrastructure + // In a real world app, you might use a remote logging infrastructure let errMsg: string; if (error instanceof Response) { const body = error.json() || ''; diff --git a/public/docs/ts/latest/guide/server-communication.jade b/public/docs/ts/latest/guide/server-communication.jade index 5ac57b4365..76a8c02aa1 100644 --- a/public/docs/ts/latest/guide/server-communication.jade +++ b/public/docs/ts/latest/guide/server-communication.jade @@ -17,27 +17,48 @@ block includes [Fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). The !{_Angular_http_library} simplifies application programming with the **XHR** and **JSONP** APIs. - This page covers: - - - [The Tour of Heroes *HTTP* client demo](#http-client). - - [Fetch data with http.get](#fetch-data). -
  • [RxJS library](#rxjs).
  • -
  • [Enable RxJS operators](#enable-rxjs-operators).
  • - - [Process the response object](#extract-data). - - [Always handle errors](#error-handling). - - [Send data to the server](#update). -
  • [Fall back to promises](#promises).
  • - - [Cross-Origin Requests: Wikipedia example](#cors). -