Slots able to pass individual values
Fixes #292
count:from="count"
works below:
can.Component.extend({
tag: "my-counter",
view: `
<can-slot name="incrementButton"
add:from="add">
<button on:click="add(1)">+1</button>
</can-slot>
<can-slot name="countDisplay"
count:from="count">
{{count}}
</can-slot>
`,
ViewModel: {
count: {type: "number", default: 0},
add(increment){
debugger;
this.count += increment;
}
}
});