I’m working on my first Ember application, and I’m having a hard time getting things to work the way I think they should. I feel like, while there’s a wealth of resources out there, there’s also a lack of explanation and intermediate-level examples. Here are some of my challenges:
When looking at models, I’m inclined to try to extensively model all the entities in the application. However, I’m not sure when Ember will try to resolve them, and I’m concerned that it may try to load all the data, spidering down through all the relationships onload. How do I know when/how to control this behavior?
I have a page that’s listing a collection of items which in turn have two collections of sub-objects. I finally got it to sort the sub-collections by using a #while and specifying the array controller. However, I’d like to conditionally alter the display for the first and last items. Unfortunately, that property isn’t on the individual item; it can only be know when used in the context of the collection. I assume this is where I should rely on the controller to decorate the items, but I don’t know how. Or, maybe I’m looking for a Component/View/Template to handle this?