Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebind behaviour in container module #1183

Open
archfz opened this issue Jan 28, 2020 · 0 comments
Open

Rebind behaviour in container module #1183

archfz opened this issue Jan 28, 2020 · 0 comments

Comments

@archfz
Copy link

archfz commented Jan 28, 2020

Expected Behavior

I would expect that doing rebinds in container modules would actually save the replaced service and when the container module is unloaded it would put back the previous service. My use case is a service that stores context data and this is used in react with router and on some subpath I need to extend the context. I use a container module on that path to load a different context. The issue is when I go back to a previous path I need to unload the module and this fully removes the context service.

Current Behavior

Currently on module unload the service is completely removed.

Possible Solution

Keep a stack of bounded references for that type and on unloads called for container modules pop the stack and set back to old service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant