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.
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.
1 Like
so how to need a specific controller instance by using needs? My case: