From 9cf71d4b00ff3d694efd0b6eb40d2327a73a293d Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Tue, 13 Dec 2016 02:18:07 -0800 Subject: [PATCH] docs(http/toh-6): improve references to in-mem-web-api (#2964) --- .../ts/latest/guide/server-communication.jade | 18 +++++++++++------- public/docs/ts/latest/tutorial/toh-pt6.jade | 7 +++---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/public/docs/ts/latest/guide/server-communication.jade b/public/docs/ts/latest/guide/server-communication.jade index 5e3b67d239..372b8efb61 100644 --- a/public/docs/ts/latest/guide/server-communication.jade +++ b/public/docs/ts/latest/guide/server-communication.jade @@ -32,8 +32,8 @@ block includes
  • [Search parameters](#search-parameters).
  • [More fun with observables](#more-observables).
  • - - [Guarding against Cross-Site Request Forgery](#xsrf) - - [Appendix: Tour of Heroes in-memory server](#in-mem-web-api). + - [Guarding against Cross-Site Request Forgery](#xsrf). + - [Appendix: Tour of Heroes _in-memory web api_](#in-mem-web-api). A live example illustrates these topics. @@ -669,14 +669,18 @@ a#in-mem-web-api The *get heroes* scenario would work, but since the app can't save changes to a JSON file, it needs a web API server. Because there isn't a real server for this demo, - it uses an *in-memory web API simulator* instead. + it substitutes the Angular _in-memory web api_ simulator for the actual XHR backend service. .l-sub-section :marked - The in-memory web api is not part of the Angular core. - It's an optional service in its own `angular-in-memory-web-api` library - installed with npm (see `package.json`) and - registered for module loading by SystemJS (see `systemjs.config.js`). + The in-memory web api is not part of Angular _proper_. + It's an optional service in its own + angular-in-memory-web-api + library installed with npm (see `package.json`). + + See the + README file + for configuration options, default behaviors, and limitations. :marked The in-memory web API gets its data from !{_a_ca_class_with} a `createDb()` diff --git a/public/docs/ts/latest/tutorial/toh-pt6.jade b/public/docs/ts/latest/tutorial/toh-pt6.jade index 46baa9c0cc..188d404222 100644 --- a/public/docs/ts/latest/tutorial/toh-pt6.jade +++ b/public/docs/ts/latest/tutorial/toh-pt6.jade @@ -91,10 +91,9 @@ block http-providers block backend :marked - We're importing the `InMemoryWebApiModule` and adding it to the module `imports`. - The `InMemoryWebApiModule` replaces the default `Http` client backend — - the supporting service that talks to the remote server — - with an _in-memory web API alternative service_. + Rather than require a real API server, this example simulates communication with the remote server by adding the + InMemoryWebApiModule + to the module `imports`, effectively replacing the `Http` client's XHR backend service with an in-memory alternative. +makeExcerpt(_appModuleTsVsMainTs, 'in-mem-web-api', '')