Is there a way to get provider instance / object at run time using string? I can get factory that way using:
var injector = angular.injector(["myApp", 'ng']);
var keyf1 = injector.get('keyF1'); //-- providing it exists
but if done for provider, injector.get
seems to return new instance of provider; that causes issue as there is statefull data in provider, so new instance is not what I need - I need access to current instance using string name.
My guess is that it could be worked around by putting statefull data into config part of provider, but I am not sure that is the best approach here .