extjs-gpl
Version:
GPL licensed version of Sencha Ext JS
22 lines (18 loc) • 457 B
JavaScript
Ext.define('KitchenSink.view.binding.FormulaModel', {
extend: 'Ext.app.ViewModel',
alias: 'viewmodel.binding-formula',
formulas: {
quad: function (get) {
return get('twice') * 2;
},
// This accomplishes the same thing as above but using object syntax.
twice: {
get: function (get) {
return get('x') * 2;
}
}
},
data: {
x: 1
}
});