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 Dec 6, 2017. It is now read-only.
When I use module.bind(MyDependency, toImplementation: MyDependency), I would expect allays the same instance of MyDependency.
But when I use: module.bind(MyDependency, toFactory: ()=>new MyDependency()), I would expect always a new instance of MyDependency when injector.get(MyDependency) is called.
Is there no possibility to bind a dependency as non singleton?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When I use
module.bind(MyDependency, toImplementation: MyDependency)
, I would expect allays the same instance of MyDependency.But when I use:
module.bind(MyDependency, toFactory: ()=>new MyDependency())
, I would expect always a new instance of MyDependency wheninjector.get(MyDependency)
is called.Is there no possibility to bind a dependency as non singleton?
The text was updated successfully, but these errors were encountered: