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
Hi! I've got a suggestion of configuration parameter that tells Container to treat all the dependencies as Singletons.
The common pattern of IoC usage is to build application architecture. In this case most of Services and Controllers acts as singletons and just a few must be instantiated every time (btw, I think this is not a good option for using IoC container at all, but anyway).
So I would wanted to have smth like this: Container.configure({ defaultScope: Scope.Singleton });
P.S. I know, currently configure() is used for another purpose, I describe just a concept.
The text was updated successfully, but these errors were encountered:
Hi! I've got a suggestion of configuration parameter that tells Container to treat all the dependencies as Singletons.
The common pattern of IoC usage is to build application architecture. In this case most of Services and Controllers acts as singletons and just a few must be instantiated every time (btw, I think this is not a good option for using IoC container at all, but anyway).
So I would wanted to have smth like this:
Container.configure({ defaultScope: Scope.Singleton });
P.S. I know, currently
configure()
is used for another purpose, I describe just a concept.The text was updated successfully, but these errors were encountered: