mirror of https://github.com/sveltejs/svelte
parent
2124aaf5be
commit
d9fcc62df7
@ -1,17 +1,18 @@
|
|||||||
<p>text in App.html: {text}</p>
|
<p>Text: {text}</p>
|
||||||
<svelte:component this={cmp} bind:text=text />
|
<svelte:component this={Child} bind:text=text />
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Nested from './Nested.html';
|
import Nested from './Nested.html';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
text: 'initial'
|
text: 'incorrect',
|
||||||
|
Child: null
|
||||||
}),
|
}),
|
||||||
|
|
||||||
oncreate() {
|
oncreate() {
|
||||||
this.set({
|
this.set({
|
||||||
cmp: Nested
|
Child: Nested
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in new issue