mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
287 B
18 lines
287 B
6 years ago
|
{#each things as thing}
|
||
|
<div>
|
||
|
<input type=checkbox bind:checked={thing.ok} />
|
||
|
</div>
|
||
|
{/each}
|
||
|
|
||
|
<div bind:this={div}>
|
||
|
{#each things as other}
|
||
|
<div>
|
||
|
{other.ok ? '+' : '-'}
|
||
|
</div>
|
||
|
{/each}
|
||
|
</div>
|
||
|
|
||
|
<script>
|
||
|
const things = [{ ok: true }, { ok: false }];
|
||
|
export let div;
|
||
|
</script>
|