This commit is contained in:
Zhimin YE (Rex) 2016-08-23 10:21:32 +01:00
parent 46f3e0c7a7
commit f82232ae05
1 changed files with 1 additions and 1 deletions

View File

@ -372,7 +372,7 @@ code-example(format="nocode").
The `AppComponent` can use that service to get heroes and so can every child component of its component tree. The `AppComponent` can use that service to get heroes and so can every child component of its component tree.
`providers`数组告诉Angular当它创建新的`AppComponent`组件时,也要创建一个`HeroService`的新实例。 `providers`数组告诉Angular当它创建新的`AppComponent`组件时,也要创建一个`HeroService`的新实例。
`AppComponent`会使用那个服务来获取影响列表,在它组件树中的每一个子组件也同样如此。 `AppComponent`会使用那个服务来获取英雄列表,在它组件树中的每一个子组件也同样如此。
a#child-component a#child-component
:marked :marked