You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
This might be more of a use case than a bug.
I have a bootstrap loader app with it's own context that prepares a service class by injecting all of it's dependencies.
I then load a sub-app with it's own context and wanted to use injector.mapValue(IMyInterface, myInstance) to inject it around the sub application. This fails because the injector tries to inject the dependencies that have already been injected by the bootstrap into the instance supplied. This seems to be working exactly as intended. Which makes sense. I would like a flag to be able to tell the injector that the injections have already been supplied to the instance and to just map the value.
I have gotten around this by just using the instance passed from the boot strap loader in a service locator style approach; No injections, but this changes the way I test it.
Ideas?
The text was updated successfully, but these errors were encountered:
Thanks for the explanation. That's an issue that Shaun and others have already brought up. By now, I think it really is a bug - specifically, the fact that the injector ever tries injects into an object that mapped with mapValue is a bug.
As much as I'm willing to fix this problem, I fear that it might cause subtle, very hard to debug changes in runtime behavior for some people.
I'll once again bring this to the attention of the Robotlegs list, in the hope of people agreeing that the change is ok and can be implemented in a point release.
This might be more of a use case than a bug.
I have a bootstrap loader app with it's own context that prepares a service class by injecting all of it's dependencies.
I then load a sub-app with it's own context and wanted to use injector.mapValue(IMyInterface, myInstance) to inject it around the sub application. This fails because the injector tries to inject the dependencies that have already been injected by the bootstrap into the instance supplied. This seems to be working exactly as intended. Which makes sense. I would like a flag to be able to tell the injector that the injections have already been supplied to the instance and to just map the value.
I have gotten around this by just using the instance passed from the boot strap loader in a service locator style approach; No injections, but this changes the way I test it.
Ideas?
The text was updated successfully, but these errors were encountered: