Alloy docs mention that you can have one or one instance of a collection. You define one way or another using the instance tag:
<Alloy>
<Collection id="localLibrary" src="book" instance="true"/>
<Window>
<TableView id="table" />
</Window>
</Alloy>
I understand the general idea of ββa single instance vs instance ... but I do not understand the direct advantage / application in order to expose it to the controller anyway.
In particular, what is the difference between this controller code:
var library = Alloy.Collections.book;
library.fetch();
and this controller code:
var library = $.localLibrary;
library.fetch();
Does he say "capture everything" instead of "capture only this?"
Any clarification would be wonderful, tia.
source
share