mirror of https://github.com/sveltejs/svelte
fix component yields inside each blocks (#230)
parent
5755334322
commit
57ba95e898
@ -0,0 +1 @@
|
||||
<p>{{yield}}</p>
|
@ -0,0 +1,3 @@
|
||||
export default {
|
||||
html: '<p>Hello Alice</p><p>Hello Bob</p><p>Hello Charles</p>'
|
||||
};
|
@ -0,0 +1,19 @@
|
||||
{{#each people as person}}
|
||||
<Widget>Hello {{person}}</Widget>
|
||||
{{/each}}
|
||||
|
||||
<script>
|
||||
import Widget from './Widget.html';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
people: [ 'Alice', 'Bob', 'Charles' ]
|
||||
};
|
||||
},
|
||||
|
||||
components: {
|
||||
Widget
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in new issue