What I've got
ember-cli POD structure. I've got nested routes and so the following folder-structure:
|
|_pods
|_items
|_index
| |_controller.js
| |_route.js
| |_template.hbs
|_item
|_controller.js
I'm loading all the item-records of my model in the model-hook of items/index/route.js. In my index-template, I'm iterating over all items from the item model.
{{#each model as |item|}}
...
{{/each}}
That works fine. Now I want to call some properties from the alpha (singular) controller, so I added the itemController-Properties in the each-helper:
{{#each model itemController='items.item' as |item|}}
now I can access properties in my template for each item like {{item.myTestMethod}} which is defined in the alpha-controller.
What is the Problem?
But for some reason, other parts between the each-loop aren't accessible anymore (like {{item.title}} which is a model property). Also, the Ember-Inspector show me now two more entries in the "View Tree"-Tab, one for every item within the each-loop.
Can anybody explain me that?