How would this usage of item controller and item view look like in Ember 2.0?


#1

Currently, I like using item controllers and item views so that I can make indexes with an array controller with an array of models which handles everything that is needed on the index level and then I make an item controller and item view which handle all computed properties which have to compute differently for each item based on each item’s model, same thing applies for the actions and events.

This is very simple and easy to use and looks like this: I have an inbox route with an inbox template to which corresponds an array controller. In there I declare:

{{#each paged itemController='messages.message-list-item'}}
	{{view 'messages.inbox-list-item'}}
{{/each}}

With this simple declaration I am able to tell Ember:

  1. to process each model’s computed properties individually in the controller ‘messages.message-list-item’

  2. Use those individual computed properties in the ‘messages.inbox-list-item’ template

  3. Trigger actions from each item in the ‘messages.inbox-list-item’ template which get handled in the ‘messages.message-list-item’ and do not affect the other items in the list

  4. Handle each item’s events in the ‘messages.inbox-list-item’ view without affecting the other items in the list

Since controllers and views are coming out in Ember 2.0. How will this look like?