fix component yields inside each blocks (#230)

pull/243/head
Rich Harris 8 years ago
parent 5755334322
commit 57ba95e898

@ -36,7 +36,7 @@ export default {
generator.generateBlock( node, yieldName );
generator.current.builders.init.addLine(
`var ${name}_yieldFragment = ${yieldName}( root, component );`
`var ${name}_yieldFragment = ${yieldName}( ${generator.current.params}, component );`
);
generator.current.builders.update.addLine(

@ -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…
Cancel
Save