From 37755044435b38aadaedc4c972b940642dab5876 Mon Sep 17 00:00:00 2001 From: Zhicheng Wang Date: Fri, 3 Mar 2017 17:23:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BF=BB=E8=AF=91=E4=BA=86=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=A4=9A=E7=BA=A7=E6=B3=A8=E5=85=A5=E5=99=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E7=9A=84=E9=83=A8=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ts/latest/guide/hierarchical-dependency-injection.jade | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade b/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade index 2aa5387fe8..8f96f89ab5 100644 --- a/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade +++ b/public/docs/ts/latest/guide/hierarchical-dependency-injection.jade @@ -63,14 +63,19 @@ figure.image-display Every component doesn't need its own injector and it would be horribly inefficient to create masses of injectors for no good purpose. - 但Angular实际上并没有为每个组件*创建*一个独立的注入器。 + Angular实际上并没有为每个组件*创建*一个独立的注入器。 每个组件并不需要自己的注入器,那样做会非常低效,而且没有好处。 But every component _has an injector_, even if it shares that injector with another component or with the injector of the root `AppModule`. And there _may_ be multiple injector instances operating at different levels of the component tree depending upon how the developer registers providers, which is the subject of this guide. + + 但是每个组件都*有*一个注入器,它可能共享其它组件的注入器或使用根模块`AppModule`的注入器。 + 而且在组件树的不同层次上还*可能有*多个注入器实例,这取决于开发人员如何注册这些提供商。这正是本章的主题。 ### Injector bubbling + + ### 注入器"冒泡" When a component requests a dependency, Angular tries to satisfy that dependency with a provider registered in that component's own injector. If the component's injector lacks the provider, it passes the request up to its parent component's injector.