mirror of
https://github.com/sveltejs/svelte.git
synced 2024-11-30 00:46:29 +01:00
f45e2b70fd
This also includes elements of RFCs 2 and 3
12 lines
251 B
HTML
12 lines
251 B
HTML
<script>
|
|
import Widget from './Widget.html';
|
|
|
|
export let a = [{ name: 'foo' }, { name: 'bar' }, { name: 'baz' }];
|
|
export let getName = x => x.name;
|
|
</script>
|
|
|
|
{#each a as x}
|
|
<Widget bind:value={x.name}/>
|
|
{/each}
|
|
|
|
<p>{a.map(getName).join(', ')}</p> |