What I want to achieve:
create controller with view, and in this view I have list of ‘Gallery’ objects. Each item has it’s own view and controller.
All files are here: https://gist.github.com/7e72bb2f532c171b1bf3
It works as intended, after hovering some text is shown/hidden, but personally I think that this it’s not so good solution.
I think that I maybe should use {{collection}} helper, but there is no documentation for it on ember.js page (there is some in code, but I’m not sure if this helper is not a little bit outdated, as in source it says “// TODO: Don’t require all of this module”).
I tried to use itemController property, but then I still have template in one file.
Also tried to use {{render}} helper in {{#each}}, but then it throw error.
So, It is there a better/cleaner way to achieve what I want?
EDIT
After making everything as in explanation provided by Michael Grassotti, I have strange behaviour – property to template is taken fron itemController, but {{action}} helper binds to parent controller. I have made screenshot to show what I’m dealing with.

Basically “this” in itemView points to right controller (itemController) but target property has parent controller.
After making {{action "deleteGallery" this target="this"}} and clicking it, I have error as in screenshot. At this moment, I’m running out of ideas…
EDIT2:
ok, I’m overthinking it, itemController is only for defining computed properties, not for writing {{action}} handlers.
EDIT3:
I think that my problem with itemController and event target will be fixed.
https://github.com/emberjs/ember.js/issues/1846
Agreed. Collection helper still works but I’m not certain it will be part of the public-api going forward. Best to stick with the
{{#each}}helper if you can.The
itemControllerproperty is a good start. that’s the best way to give each item it’s own controller.Yeah the
{{render}}helper is not designed for use within an{{each}}block.Yep. For starters use the
itemControllerproperty. Then to give each it’s own view, provide anitemViewClassoption to the{{each helper}}. For example:See the “blockless use” section of api docs for the each helper for detail.
Then customize
App.GalleriesIndexItemViewto specify a template:and move html from the each helper to into the template:
Now every item has it’s own view and controller.