fixed: toh-pt6

This commit is contained in:
Zhimin YE (Rex) 2016-08-24 14:11:32 +01:00
parent 90b7c0a475
commit c26d6a87a0
1 changed files with 3 additions and 1 deletions

View File

@ -97,7 +97,7 @@ block http-providers
我们要能从本应用的任何地方访问`http`服务,所以,就要在`app.module.ts`中的`imports`数组中注册它们。
这里同时也是我们引导应用及其根组件`AppComponent`的地方。
+makeExample('app/app.module.ts', 'v1','app/app.module.ts (v1)')
+makeExample('app/app.module.ts', 'v1','app/app.module.ts (v1)')
:marked
Notice that we supply `!{_HttpModule}` as part of the *imports* !{_array} in root NgModule `AppModule`.
@ -156,6 +156,8 @@ block backend
The `forRoot` configuration method takes an `InMemoryDataService` class
that will prime the in-memory database as follows:
`forRoot`配置方法需要`InMemoryDataService`类实例,用来向内存数据库添加种子数据:
+makeExample('app/in-memory-data.service.ts', 'init')(format='.')
p This file replaces the #[code #[+adjExPath('mock-heroes.ts')]] which is now safe to delete.