Hi all,
Very quick question I think. Is it possible to listen to change events on observes using templated event binding in controls?
Such as:
define(['can', 'core/global/appState'], function(can, AppState) {
var AppControl;
return AppControl = can.Controll({
init: function(element, options){
},
'{AppState} change': function(ev, attr, how, newVal, oldVal) {
console.log('appState changed2', ev, attr, how, newVal, oldVal);
},
});
});
Where appstate a single Observe that is passed around.
Thanks,
Adam