I’m new with Ember, so I guess there’s a simple answer to that:
I’m using ‘needs’ declaration, to reach from a template to the data of another controller (let’s call it ‘controllerB’).
The issue is that the data I’m consuming from this ‘controllerB’, is not an object , but an array.
So in the template I can reach the whole array by {{controllers.controllerB}}, or loop over all the objects in the array using
{{#each item in controllers.controllerB}}.
But - how can I reach a specific object in that array (by ID)??
Handlebars cant do any kind of variable based logic other than boolean block Ifs (by design), so whatever view or controller is sat between your handlebars template and ControllerB should implement some kind of getsingleobject method, perhaps using an observed property to decide which item to return ala: