0

I was wondering if it was possible to included nested models in collections in Appcelerator Alloy?

I have a list of posts and each post has nested model of comments and likes. How do I go about doing that?

Here is my code:

 <Alloy>
   <Collection src="post">
     <Window>
      <TableView id="table" dataCollection="post">
         <TableViewRow class="row">
            <Label text="{title}></Label>
            ****How Do I load list of comments and likes within the collection?****
            ****{comments}****
            ****{likes}*****
         </TableViewRow>
      </TableView>
     </Window>
 </Alloy>
daniula
  • 6,898
  • 4
  • 32
  • 49
yamill
  • 64
  • 6

1 Answers1

0

This question was answered on the appcelerator developer website here: http://developer.appcelerator.com/question/157945/collection-nested-model-list-alloy

As: Can't do this via binding right now, you have to do it by hand in the controller. But, a similar StackOverflow question was recently answered by proposing using the backbone associate library: https://stackoverflow.com/a/18022416/1867622

Community
  • 1
  • 1
user1867622
  • 83
  • 10