]>
Commit | Line | Data |
---|---|---|
6527f429 DM |
1 | Ext.define('KitchenSink.view.binding.FormulasModel', {\r |
2 | extend: 'Ext.app.ViewModel',\r | |
3 | \r | |
4 | alias: 'viewmodel.binding-formulas',\r | |
5 | \r | |
6 | formulas: {\r | |
7 | quad: function (get) {\r | |
8 | return get('twice') * 2;\r | |
9 | },\r | |
10 | \r | |
11 | // This accomplishes the same thing as above but using object syntax.\r | |
12 | twice: {\r | |
13 | get: function (get) {\r | |
14 | return get('x') * 2;\r | |
15 | }\r | |
16 | }\r | |
17 | }\r | |
18 | });\r |