[ALOY-84] Models are only generated in the index component
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-07-19T11:52:03.000+0000 |
Affected Version/s | 2012 Sprint 14 |
Fix Version/s | 2012 Sprint 14 |
Components | Runtime, XML |
Labels | n/a |
Reporter | Tony Lukasavage |
Assignee | Tony Lukasavage |
Created | 2012-07-10T06:06:40.000+0000 |
Updated | 2014-06-22T13:21:22.000+0000 |
Description
Model generation still makes the assumption that alloy files consist only of an app.js. Therefore, models are only generated into the index component object.
There's a few things that can be remedied here.
* Models should not be dumped as variables into component objects. They should be generated into their own commonjs modules. Those modules will be housed in
Resources/alloy/models
at runtime.
* It would be nice if the models were accessible from the Alloy
namespace. Perhaps as Alloy.Models.MODEL_NAME
* Models will be made accessible, as needed, from all component objects via require() or the Alloy namespace.
* Models will than be able to make changes in multiple parts of the application, not just the current component object.
Complete and included in the latest Alloy