Code:
viewModel.bind({bindTo: '{myObj}', deep: true}, function(data) {
console.log('bind called with ' + data);
});
var myObj = {
name: 'name1'
}
viewModel.set('myObj', myObj);
viewModel.notify();
viewModel.set('myObj.name', 'name2')
viewModel.notify();
The second viewModel.set() call does not trigger the bind callback for me. I thought "deep: true" would trigger it for any properties. Or, am I doing something wrong?
Aucun commentaire:
Enregistrer un commentaire