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