docs(http/toh-6): improve references to in-mem-web-api (#2964)

This commit is contained in:
Ward Bell 2016-12-13 02:18:07 -08:00 committed by GitHub
parent 20f47aa600
commit 9cf71d4b00
2 changed files with 14 additions and 11 deletions

View File

@ -32,8 +32,8 @@ block includes
<li> [Search parameters](#search-parameters).</li>
<li> [More fun with observables](#more-observables).</li>
</ul>
- [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>live example</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
<a href="https://github.com/angular/in-memory-web-api" target="_blank" title="In-memory Web API"><i>angular-in-memory-web-api</i></a>
library installed with npm (see `package.json`).
See the
<a href="https://github.com/angular/in-memory-web-api/blob/master/README.md" target="_blank" title='In-memory Web API "README.md"'><i>README file</i></a>
for configuration options, default behaviors, and limitations.
:marked
The in-memory web API gets its data from !{_a_ca_class_with} a `createDb()`

View File

@ -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 &mdash;
the supporting service that talks to the remote server &mdash;
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
<a href="https://github.com/angular/in-memory-web-api" target="_blank" title="In-memory Web API"><i>InMemoryWebApiModule</i></a>
to the module `imports`, effectively replacing the `Http` client's XHR backend service with an in-memory alternative.
+makeExcerpt(_appModuleTsVsMainTs, 'in-mem-web-api', '')