Add test case for binding using each block value

pull/3079/head
Bryan Terce 6 years ago
parent b7e4064407
commit 9b13553665
No known key found for this signature in database
GPG Key ID: DF2E2829CA6E5BF4

@ -0,0 +1,12 @@
export default {
skip_if_ssr: true,
html: `
<div>foo</div>
<div>first has foo: true</div>
<div>foo</div>
<div>second has foo: true</div>
<div>foo</div>
<div>third has foo: true</div>
`
};

@ -0,0 +1,11 @@
<script>
import Foo from './Foo.svelte';
export let foo = {};
</script>
{#each ["first", "second", "third"] as value}
<Foo bind:this={foo[value]}/>
<div>
{value} has foo: {!!foo[value]}
</div>
{/each}
Loading…
Cancel
Save