docs(di): remove InjectorMetadata mentions
This commit is contained in:
parent
87981260e0
commit
d1987b183b
|
@ -388,10 +388,10 @@ block ctor-syntax
|
|||
We call that property within our `getHeroes` method when anyone asks for heroes.
|
||||
|
||||
//- FIXME refer to Dart API when that page becomes available.
|
||||
- var injMetaUrl = 'https://angular.io/docs/ts/latest/api/core/index/InjectableMetadata-class.html';
|
||||
- var injUrl = 'https://angular.io/docs/ts/latest/api/core/index/Injectable-decorator.html';
|
||||
h3#injectable Why @Injectable()?
|
||||
:marked
|
||||
**<a href="#{injMetaUrl}">@Injectable()</a>** marks a class as available to an
|
||||
**<a href="#{injUrl}">@Injectable()</a>** marks a class as available to an
|
||||
injector for instantiation. Generally speaking, an injector will report an
|
||||
error when trying to instantiate a class that is not marked as
|
||||
`@Injectable()`.
|
||||
|
@ -423,8 +423,8 @@ block injectable-not-always-needed-in-ts
|
|||
We *can* add it if we really want to. It isn't necessary because the
|
||||
`HeroesComponent` is already marked with `@Component`, and this
|
||||
!{_decorator} class (like `@Directive` and `@Pipe`, which we'll learn about later)
|
||||
is a subtype of <a href="#{injMetaUrl}">InjectableMetadata</a>. It is in
|
||||
fact `InjectableMetadata` #{_decorator}s that
|
||||
is a subtype of <a href="#{injUrl}">Injectable</a>. It is in
|
||||
fact `Injectable` #{_decorator}s that
|
||||
identify a class as a target for instantiation by an injector.
|
||||
|
||||
+ifDocsFor('ts')
|
||||
|
@ -442,7 +442,7 @@ block injectable-not-always-needed-in-ts
|
|||
for _every class with at least one decorator_.
|
||||
|
||||
While any decorator will trigger this effect, mark the service class with the
|
||||
<a href="#{injMetaUrl}">InjectableMetadata</a> #{_decorator}
|
||||
<a href="#{injUrl}">Injectable</a> #{_decorator}
|
||||
to make the intent clear.
|
||||
|
||||
.callout.is-critical
|
||||
|
|
Loading…
Reference in New Issue