fix: server-communication

This commit is contained in:
Zhimin YE (Rex) 2016-08-24 14:51:07 +01:00
parent 5dfd0e3364
commit 1b59799b60
1 changed files with 7 additions and 0 deletions

View File

@ -134,6 +134,8 @@ block demos-list
:marked
First, we have to configure our application to use server communication facilities.
首先,我们必须配置应用来使用与服务器对话的功能。
.l-main-section#http-providers
:marked
# Providing HTTP Services
@ -1178,10 +1180,15 @@ block redirect-to-web-api
This redirection is easy to configure with the in-memory web API service module.
by adding the `InMemoryWebApiModule` to the `AppModule.imports` list.
At the same time, we calling its `forRoot` configuration method with the `HeroData` class.
使用内存Web API服务模块很容易配置重定向将`InMemoryWebApiModule`添加到`AppModule.imports`列表中,
同时在`HeroData`类中调用`forRoot`配置方法。
+makeExample('server-communication/ts/app/app.module.ts', 'in-mem-web-api')(format=".")
:marked
### How it works
### 工作原理
Angular's `http` service delegates the client/server communication tasks
to a helper service called the `XHRBackend`.