[ALOY-390] Create <Model> in markup (singleton)
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Medium |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2012-11-29T23:21:11.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Alloy 0.3.3, 2012 Sprint 24 |
| Components | XML |
| Labels | notable |
| Reporter | Tony Lukasavage |
| Assignee | Unknown |
| Created | 2012-11-14T20:04:15.000+0000 |
| Updated | 2018-03-07T22:26:11.000+0000 |
Description
Very much like its counterpart in ALOY-373. Allow developers to create a singleton of models in markup. This will make model-view binding even easier and more expressive. It is also even less code developers will need to achieve model-view binding.
<Model src="myModel"/>
where *myModel* refers to an Alloy model definition that you would find in *app/models*. A model generated this way will be accessible anywhere in the application via the Alloy.Models namespace. To access the above, you would do:
var singleton = Alloy.Models.myModel;
No comments