review(toh-pt6): line 243
This commit is contained in:
parent
b97f82a171
commit
1f883722c9
|
@ -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.
|
||||
|
||||
|
@ -70,8 +70,7 @@ block http-library
|
|||
shipped in a separate script file as part of the Angular npm package.
|
||||
|
||||
`Http`***并不是***Angular的核心模块。
|
||||
它是Angular用来进行Web访问的一种可选方式,并通过Angular包中一个名叫`@angular/http`的独立附属模块发布了出来。
|
||||
|
||||
它是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.
|
||||
|
||||
|
@ -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`.
|
||||
|
|
Loading…
Reference in New Issue