docs(tutorial): toh-4 (Services) typo
closes #647 missing period in 'hero-detailcomponent.ts'
This commit is contained in:
parent
58ea050065
commit
14900ea97c
|
@ -211,7 +211,7 @@ code-example(format="." language="html").
|
|||
|
||||
If the `HeroDetailComponent` needed its parent component's `HeroService`,
|
||||
it would ask Angular to inject the service into its constructor which would look just like the one for `AppComponent`:
|
||||
+makeExample('toh-4/ts/app/app.component.1.ts', 'ctor', 'hero-detailcomponent.ts (constructor)')
|
||||
+makeExample('toh-4/ts/app/app.component.1.ts', 'ctor', 'hero-detail.component.ts (constructor)')
|
||||
:marked
|
||||
The `HeroDetailComponent` must *not* repeat it's parent's `providers` array! Guess [why](#shadow-provider).
|
||||
|
||||
|
@ -393,4 +393,4 @@ code-example(format="." language="html").
|
|||
Adding the `providers` array creates a new service instance that shadows the parent instance.
|
||||
|
||||
Think carefully about where and when to register a provider.
|
||||
Understand the scope of that registration. Be careful not to create a new service instance at the wrong level.
|
||||
Understand the scope of that registration. Be careful not to create a new service instance at the wrong level.
|
||||
|
|
Loading…
Reference in New Issue