Merge pull request #1612 from ekhaled/gh-1589

Fixes #1589
pull/1595/merge
Rich Harris 7 years ago committed by GitHub
commit 01a099d2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -90,6 +90,9 @@ export default class IfBlock extends Node {
dynamic = true;
block.addDependencies(node.else.block.dependencies);
}
if (node.else.block.hasIntros) hasIntros = true;
if (node.else.block.hasOutros) hasOutros = true;
}
}

@ -0,0 +1,10 @@
export default {
nestedTransitions: true,
html: '<div>A wild component appears</div><p>x</p><input type="text">',
test(assert, component, target) {
component.set({ x: 'y' });
assert.htmlEqual(target.innerHTML, '<div>A wild component appears</div><p>y</p><input type="text">');
},
};

@ -0,0 +1,21 @@
{#if foo}
<p>foo</p>
{:else}
<Widget/>
<p>{x}</p>
<input type="text" bind:value=x />
{/if}
<script>
export default {
components: {
Widget: './Widget.html'
},
data() {
return {
x: 'x'
};
}
};
</script>
Loading…
Cancel
Save