review(toh-pt6): line 243

This commit is contained in:
Zhimin YE (Rex) 2016-06-30 17:08:34 +01:00
parent b97f82a171
commit 1f883722c9
1 changed files with 8 additions and 6 deletions

View File

@ -17,8 +17,8 @@ block includes
Now they want to get the hero data from a server, let users add, edit, and delete heroes,
and save these changes back to the server.
客户很欣赏我们的进展
现在,他们想要从服务器获取英雄数据,然后让用户添加、编和删除英雄,并且把这些修改结果保存回服务器。
客户对我们的进展很满意
现在,他们想要从服务器获取英雄数据,然后让用户添加、编和删除英雄,并且把这些修改结果保存回服务器。
In this chapter we teach our application to make the corresponding HTTP calls to a remote server's web API.
@ -72,7 +72,6 @@ block http-library
`Http`***并不是***Angular的核心模块。
它是Angular用来进行Web访问的一种可选方式并通过Angular包中一个名叫`@angular/http`的独立附属模块发布了出来。
Fortunately we're ready to import from `@angular/http` because `systemjs.config` configured *SystemJS* to load that library when we need it.
幸运的是,`systemjs.config`中已经配置好了*SystemJS*,并在必要时加载它,因此我们已经为从`@angular/http`中导入它做好了准备。
@ -95,7 +94,8 @@ block http-providers
So we register them in the `bootstrap` call of `main.!{_docsFor}` where we
launch the application and its root `AppComponent`.
我们要能从本应用的任何地方访问这些服务,所以,我们就要在`main.ts`中的`bootstrap`方法中注册它们。这里同时也是我们启动应用及其根组件`AppComponent`的地方。
我们要能从本应用的任何地方访问这些服务,所以,就要在`main.ts`中的`bootstrap`方法中注册它们。
这里同时也是我们启动应用及其根组件`AppComponent`的地方。
+makeExcerpt('app/main.ts','v1')
@ -191,7 +191,7 @@ block dont-be-distracted-by-backend-subst
That day has arrived! Let's convert `getHeroes()` to use HTTP:
一天到来了!我们把`getHeroes()`换成用HTTP。
一天到来了!我们把`getHeroes()`换成用HTTP。
+makeExcerpt('app/hero.service.ts (new constructor and revised getHeroes)', 'getHeroes')
@ -202,6 +202,8 @@ block dont-be-distracted-by-backend-subst
We're still returning a !{_Promise} but we're creating it differently.
我们仍然返回一个承诺,但是用不同的方法来创建它。
block get-heroes-details
:marked
The Angular `http.get` returns an RxJS `Observable`.