mirror of https://github.com/sveltejs/svelte
parent
b8454de57f
commit
246b4d70dc
@ -0,0 +1,16 @@
|
||||
const items = [ { id: 'a' }, { id: 'b' } ];
|
||||
|
||||
export default {
|
||||
'skip-ssr': true,
|
||||
|
||||
data: {
|
||||
items
|
||||
},
|
||||
|
||||
test ( assert, component, target ) {
|
||||
const items = component.get('items');
|
||||
|
||||
assert.equal( items[0].id, 'a' );
|
||||
assert.equal( items[1].id, 'b' );
|
||||
}
|
||||
};
|
@ -0,0 +1,6 @@
|
||||
{{#each items as item}}
|
||||
<select bind:value="item.id">
|
||||
<option value='a'>a</option>
|
||||
<option value='b'>b</option>
|
||||
</select>
|
||||
{{/each}}
|
Loading…
Reference in new issue