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