diff --git a/public/docs/ts/latest/cookbook/component-communication.jade b/public/docs/ts/latest/cookbook/component-communication.jade index b1bca91b9e..10a276c2fd 100644 --- a/public/docs/ts/latest/cookbook/component-communication.jade +++ b/public/docs/ts/latest/cookbook/component-communication.jade @@ -397,7 +397,7 @@ a(id="countdown-tests") The scope of the service instance is the parent component and its children. Components outside this component subtree have no access to the service or their communications. - 该服务实例的作用范围被限制在父组件和其子组件内。这个组件子树之外的组件将无法访问该服务或者与它们通讯。 + 该服务实例的作用域被限制在父组件和其子组件内。这个组件子树之外的组件将无法访问该服务或者与它们通讯。 This `MissionService` connects the `MissionControlComponent` to multiple `AstronautComponent` children. diff --git a/public/docs/ts/latest/cookbook/dependency-injection.jade b/public/docs/ts/latest/cookbook/dependency-injection.jade index 6227855f2f..604519f7c6 100644 --- a/public/docs/ts/latest/cookbook/dependency-injection.jade +++ b/public/docs/ts/latest/cookbook/dependency-injection.jade @@ -26,7 +26,7 @@ include ../_util-fns [Limit service scope to a component subtree](#service-scope) - [把服务作用范围限制到一个子组件树](#service-scope) + [把服务作用域限制到一个子组件树](#service-scope) [Multiple service instances (sandboxing)](#multiple-service-instances) @@ -303,7 +303,7 @@ figure.image-display :marked ## Limit service scope to a component subtree - ## 把服务作用范围限制到一个组件支树 + ## 把服务作用域限制到一个组件支树 All injected service dependencies are singletons meaning that, for a given dependency injector ("injector"), there is only one instance of service. @@ -334,7 +334,7 @@ figure.image-display by providing that service *at the sub-root component for that branch*. Here we provide the `HeroService` to the `HeroesBaseComponent` by listing it in the `providers` array: - 通过*在组件树的子级根组件*中提供服务,可以把一个被注入服务的作用范围局限在应用程序结构中的某个*分支*中。 + 通过*在组件树的子级根组件*中提供服务,可以把一个被注入服务的作用域局限在应用程序结构中的某个*分支*中。 这里通过列入`providers`数组,在`HeroesBaseComponent`中提供了`HeroService`: +makeExample('cb-dependency-injection/ts/app/sorted-heroes.component.ts','injection','app/sorted-heroes.component.ts (HeroesBaseComponent excerpt)') diff --git a/public/docs/ts/latest/glossary.jade b/public/docs/ts/latest/glossary.jade index d81dea7844..abeaff0c39 100644 --- a/public/docs/ts/latest/glossary.jade +++ b/public/docs/ts/latest/glossary.jade @@ -322,7 +322,7 @@ include _util-fns that it decorates. None of the decorations shown here will "leak" to other classes appearing below it in the file. - 一个装饰器的作用范围会被限制在它所装饰的东西上,这是一个语言级特性。在上面这个例子中,就算别的类在同一个文件中紧跟着上面的类也不会有任何装饰器“泄露”到其它类。 + 一个装饰器的作用域会被限制在它所装饰的东西上,这是一个语言级特性。在上面这个例子中,就算别的类在同一个文件中紧跟着上面的类也不会有任何装饰器“泄露”到其它类。 .alert.is-important :marked diff --git a/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade b/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade index f42308974c..2e1380f64c 100644 --- a/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade +++ b/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade @@ -279,7 +279,7 @@ figure.image-display 但很明显,这个场景下我们不希望这样。我们希望每个组件都有它自己的`RestoreService`实例。 在组件级别上定义(或重定义)一个提供商,将会为该组件创建一个新的服务实例。 - 我们已经为`HeroEditComponent`制造了一种“私有”`RestoreService`单例,它的作用范围被局限在了该组件的实例及其子组件中。 + 我们已经为`HeroEditComponent`制造了一种“私有”`RestoreService`单例,它的作用域被局限在了该组件的实例及其子组件中。