[ALOY-379] Create <Collection> in markup (instance)
|Fix Version/s||Alloy 0.3.3, 2012 Sprint 24|
<!-- "src" is the Alloy Model on which the collection is based --> <Alloy> <!-- Accessible globally as Alloy.Collections.myModel --> <Collection src="myModel"/> </Alloy>
While a singleton<!-- * "src" is the Alloy Model on which the collection is based * "id" works just like it does on UI components, creating a reference * "instance" tells Alloy to create an instance instead of a singleton --> <Alloy> <!-- Accessible as $.myModel in corresponding controller --> <Collection id="someId" src="myModel" instance="true"/> </Alloy>
var collectionInstance = $.someId;
- Tony Lukasavage 2012-11-28
In the process of creating
instances, a lot of additional validation and error reporting was added to the Alloy.Collection parser. In addition, the models/todo_binding test app was updated and had a bug or two in it fixed.