Update ts-to-js.jade (#2888)
This commit is contained in:
parent
d89a5ab9be
commit
87d65aeda0
|
@ -467,15 +467,15 @@ a#io-decorators
|
|||
by calling the `@Inject()` decorator with the injection token.
|
||||
In the following example, the token is the string `'heroName'`.
|
||||
|
||||
The other JavaScript dialogs add a `parameters` array to the class contructor function.
|
||||
Each item constains a new instance of `Inject('heroName')`:
|
||||
The other JavaScript dialects add a `parameters` array to the class contructor function.
|
||||
Each item constains a new instance of `Inject`:
|
||||
|
||||
* _plain ES6_ — each item is a new instance of `Inject(token)` in a sub-array.
|
||||
|
||||
* _ES5_ — simply list the string tokens.
|
||||
|
||||
When writing with _ES5 DSL_, set the `Class.constructor` property to a function definition
|
||||
array as before. Create a `new ng.core.Inject(token)` for each parameter.
|
||||
array as before. Create a new instance of `ng.core.Inject(token)` for each parameter.
|
||||
|
||||
+makeTabs(`
|
||||
cb-ts-to-js/ts/app/hero-di-inject.component.ts,
|
||||
|
|
Loading…
Reference in New Issue