Did not have much time to look into this problem, but I was thinking try
to solve it by defining a custom attribute, using can.view.attr;
Somthing like:
- can.view.attr(/lookup-bind-\w+/, function(el, attrData) {
- ...
- };
- Component.extend({
- tag: 'myapp-grid',
- template: can.stache(... + '<myapp-grid-col-filter column="{.}" lookup-bind-kv="../filter.{{id}}"></myapp-grid-col-filter> ' +...,
- viewModel: { ... }
- });
Inside the custom behavior function for the /lookup-bind-\w+/
attribute, I should set up the double binding between the the
childs' 'kv' attribute and the parent's
'../filter.{{id}}' attribute.
Does this seem like a possible solution?