cherifGsoul on upgrade-docs-html-canjs
cherifGsoul on master
Upgrade the site theme for new … (compare)
cherifGsoul on upgrade-docs-html-canjs
Upgrade the site theme for new … (compare)
then you could do:
<input type=“radio” can-value=“{foo}” can-type=“boolean”/>
<input can-value=“{modifiedAt}” can-type=“date”/>
<input can-value=“{price}” can-format=“$dd.dd”/>
or something
computeA.value
seems to work.
var ChildVM = can.Map.extend({
define: {
myComputed: {
get: function(){ return 'foo';}
}
}
});
can.Component.extend({
tag: 'my-child',
viewmodel: ChildVM
});
can.Component.extend({
tag: 'my-parent',
template: can.stache('<my-child myComputed="{getComputed}"></my-child>')
viewmodel: {
getComputed: null
}
});
can.Map
’s with { type: ‘compute’ }
. It’s just not documented yet: bitovi/canjs#1690
can.Map.define
. A compute takes a property on set… compute(newVal)
. So if you unknowingly attempted to set list
to something else, like.. map.attr(‘list’, someOtherList)
, you’ll actually be passing someOtherList
to the compute, like this.. map.list(someOtherList)
, as opposed to map.list = someOtherList
. Does that make sense?