This commit is contained in:
parent
7c4bbbd10c
commit
6e5fe6ff14
|
@ -272,7 +272,11 @@ a#interface-optional
|
||||||
Angular can't see TypeScript interfaces at runtime because they disappear from the transpiled JavaScript.
|
Angular can't see TypeScript interfaces at runtime because they disappear from the transpiled JavaScript.
|
||||||
|
|
||||||
从纯技术的角度讲,接口对JavaScript和TypeScript的开发者都是可选的。JavaScript语言本身没有接口。
|
从纯技术的角度讲,接口对JavaScript和TypeScript的开发者都是可选的。JavaScript语言本身没有接口。
|
||||||
Angular在运行时看不到TypeScript接口,因为它们在编译为JavaScript的时候已经消失了。Fortunately, they aren't necessary.
|
Angular在运行时看不到TypeScript接口,因为它们在编译为JavaScript的时候已经消失了。
|
||||||
|
|
||||||
|
Fortunately, they aren't necessary.
|
||||||
|
|
||||||
|
幸运的是,它们并不是必须的。
|
||||||
|
|
||||||
You don't have to add the lifecycle hook interfaces to directives and components to benefit from the hooks themselves.
|
You don't have to add the lifecycle hook interfaces to directives and components to benefit from the hooks themselves.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue