commit
72c22e17cc
@ -681,7 +681,8 @@ block injectable-not-always-needed-in-ts
|
|||||||
identify a class as a target for instantiation by an injector.
|
identify a class as a target for instantiation by an injector.
|
||||||
|
|
||||||
我们**可以**添加它。但是没有必要,因为`HerosComponent`已经有`@Component`装饰器了,
|
我们**可以**添加它。但是没有必要,因为`HerosComponent`已经有`@Component`装饰器了,
|
||||||
`@Component`(和随后将会学到的`@Directive`和`@Pipe`一样)是 <a href="#{injUrl}">Injectable</a> 的子类型。实际上,正是这些`Injectable`装饰器是把一个类标识为注入器实例化的目标。
|
`@Component`(和随后将会学到的`@Directive`和`@Pipe`一样)是 <a href="#{injUrl}">Injectable</a> 的子类型。
|
||||||
|
实际上,正是这些`Injectable`装饰器是把一个类标识为注入器实例化的目标。
|
||||||
|
|
||||||
+ifDocsFor('ts')
|
+ifDocsFor('ts')
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
|
Loading…
x
Reference in New Issue
Block a user