making components update
This commit is contained in:
parent
345a013156
commit
69b6bf969b
@ -15,7 +15,8 @@
|
||||
Given a bootstrapping template with a <code><parent></code> tag in the body, you can create a parent
|
||||
component that uses a <code><child></code> component like so:
|
||||
|
||||
pre.prettyprint.linenums.lang-javascript
|
||||
.code-box
|
||||
pre.prettyprint.linenums.lang-javascript(data-name="es5")
|
||||
code.
|
||||
//ES5
|
||||
function ParentComponent() {
|
||||
@ -33,7 +34,7 @@
|
||||
})
|
||||
];
|
||||
|
||||
pre.prettyprint.linenums.lang-typescript
|
||||
pre.prettyprint.linenums.lang-typescript(data-name="typescript")
|
||||
code.
|
||||
//TypeScript
|
||||
@Component({
|
||||
@ -56,7 +57,8 @@
|
||||
|
||||
p You then just need to write the <code>ChildComponent</code> class to make it work:
|
||||
|
||||
pre.prettyprint.linenums.lang-javascript
|
||||
.code-box
|
||||
pre.prettyprint.linenums.lang-javascript(data-name="es5")
|
||||
code.
|
||||
//ES5
|
||||
function ChildComponent() {
|
||||
@ -71,7 +73,7 @@
|
||||
})
|
||||
];
|
||||
|
||||
pre.prettyprint.linenums.lang-typescript
|
||||
pre.prettyprint.linenums.lang-typescript(data-name="typescript")
|
||||
code.
|
||||
//TypeScript
|
||||
@Component({
|
||||
|
Loading…
x
Reference in New Issue
Block a user