You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
@@ -21,19 +21,19 @@ include ../../../../_includes/_util-fns
21
21
In the [Dependency Injection](./dependency-injection.html) chapter
22
22
we learned how to configure a dependency injector and how to retrieve dependencies where we need them.
23
23
24
-
We oversimplified. In fact, there is no such thing as ***the*** injector!
24
+
We oversimplified. In fact, there is no such thing as ***the*** injector!
25
25
An application may have multiple injectors!
26
26
27
27
An Angular application is a tree of components. Each component instance has its own injector!
28
28
The tree of components parallels the tree of injectors.
29
-
29
+
30
30
31
31
.l-sub-section
32
32
:marked
33
-
Angular doesn't *literally* create a separate injector for each component.
34
-
Every component doesn't need its own injector and it would be horribly inefficient to create
33
+
Angular doesn't *literally* create a separate injector for each component.
34
+
Every component doesn't need its own injector and it would be horribly inefficient to create
35
35
masses of injectors for no good purpose.
36
-
36
+
37
37
But it is true that every component ***has an injector*** (even if it shares that injector with another component)
38
38
and there may be many different injector instances operating at different levels of the component tree.
39
39
@@ -135,12 +135,12 @@ figure.image-display
135
135
136
136
Our `HeroEditComponent` uses this services under the hood for it’s `hero` property. It intercepts the `get` and `set` method to delegate the actual work to our `RestoreService` which in turn makes sure that we won’t work on the original item but on a copy instead.
137
137
138
-
At this point we may be scratching our heads asking what this has to do with component injectors?
139
-
If closely at the metadata for our `HeroEditComponent`. Notice the `providers` property.
138
+
At this point we may be scratching our heads asking what this has to do with component injectors?
139
+
Look closely at the metadata for our `HeroEditComponent`. Notice the `providers` property.
0 commit comments