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
It is responsible for collecting events when application is running, and no direct use was expected for that provider. Currently, to start such listener, the provider needs to be directly injected to the code:
injector.inject('listener')
But this is not very handy, as the provider is not expected to return any object, and is error-prone when called too late.
The solution will be to add autoinject=True|False (with False as default) to the provides decorator, so the injector will automatically create such providers when scope is entered, and destroy when scope is left:
I had following provider added to a project I work on:
It is responsible for collecting events when application is running, and no direct use was expected for that provider. Currently, to start such listener, the provider needs to be directly injected to the code:
But this is not very handy, as the provider is not expected to return any object, and is error-prone when called too late.
The solution will be to add
autoinject=True|False
(withFalse
as default) to theprovides
decorator, so the injector will automatically create such providers when scope is entered, and destroy when scope is left:The text was updated successfully, but these errors were encountered: