bind

var rec = new XS.model.User({
    id: 12,
    name: 'Foo'
});

var viewModel = new Ext.app.ViewModel({
    links: {
        theUser: {
            type: 'xsT_comeg8989o',
            id: 17
        }
    },
    data: {
        otherUser: rec
    }
});

viewModel.bind('{otherUser.name}', function(v) {
    console.log(v+'afasfasfasfafafasdf');
});
viewModel.set('otherUser.name',999)

 

Leave a Reply

Your email address will not be published. Required fields are marked *