di.js
di.js copied to clipboard
Modules should isolate configs
Hi di.js folks,
I recently opened an issue on the core Angular project asking for a way to isolate service/provider configuration per-module. It was closed as infeasible for v1.x, but @caitp suggested I open an issue here to put it on the radar for v2.
Original issue is here: https://github.com/angular/angular.js/issues/8404
Thanks!
Thanks @jimbru. I agree that the current behavior in 1.x is very leaky.
We don't have this problem in di.js, because there are no "stateful providers". There is a discussion about configuration (see #56). As long as we keep it declarative, this issue won't exist.
In a child injector, you can register a different configuration. It won't affect parent/sibling injectors.