Documentation / "needs" API: is it only for singleton controllers?


#1

Shall we assume that the “needs” API only works for singleton controllers? By that I mean if you use {{#each ... itemController=... }} or {{render ... modelX}} and “needs” the respective controller later it does not seem to work. On the other side, the doc does not state that it should only be used with singletons. So I was just hoping to get clarification on this.

Example: jsfiddle.net/8V9xQ/7


#2

needs are looked up using container.lookup('controller:someName'), which will always return a singleton controller, when not called as container.lookup('controller:someName', {singleton: false}).

So yes, needs only works for singleton controllers.


#4

so how to need a specific controller instance by using needs? My case:


Outlet or render best practice?