Titanium JIRA Archive
Alloy (ALOY)

[ALOY-390] Create <Model> in markup (singleton)

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusResolved
ResolutionFixed
Resolution Date2012-11-29T23:21:11.000+0000
Affected Version/sn/a
Fix Version/sAlloy 0.3.3, 2012 Sprint 24
ComponentsXML
Labelsnotable
ReporterTony Lukasavage
AssigneeUnknown
Created2012-11-14T20:04:15.000+0000
Updated2018-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;

Comments

No comments

JSON Source