These are chat archives for canjs/canjs

17th
Aug 2015
Mohamed Cherif Bouchelaghem
@cherifGsoul
Aug 17 2015 11:10
hello does can.viewModel to add can-EVENT handker work only when using jquery? because it dosent work for me with zepto?
handler*
Aggelos Karalias
@mehiel
Aug 17 2015 12:30
hi all.. I'm trying to 2-way bind a component's attr with a parent scope's attr.. is this the intention of https://github.com/bitovi/canjs/blob/minor/view/bindings/bindings.js#L545 ? Could something like that do the job? <my-component #par-attr-name="comp-attr-name" />Or I should implement something from scratch?
Aggelos Karalias
@mehiel
Aug 17 2015 12:50
I just found it in the 2.3-pre docs
Aggelos Karalias
@mehiel
Aug 17 2015 13:26
but it doesn't work 2-way.. That .getRefs() in line 559 returns an empty map which even though it's being updated correctly it doesn't reflect in parent viewModel's attr..
if I apply this patch it does work but as I'm not really aware of that Refs concept in Scope I'm not sure if that breaks something else..
@@ -537,7 +537,7 @@

         var viewModel = can.viewModel(el);
         var scope = new can.view.Scope(viewModel);
-        var refs = attrData.scope.getRefs();
+        var refs = attrData.scope.getViewModel();

         var computeData = scope.computeData(prop, {
         args: [],