I've been reading the official docs https://docs.angularjs.org/api/auto/service/$injector but failed to find how to de-inject a dependency.
My scenario:
I have a service that authenticates users, and a number of services that only make sense for authenticated users.
I'd like to handle a successful login-logout programatically, and inject-uninject the other services depending on whether the user is logged in.
Does anyone know if it's possible to dynamically de-inject a dependency in an AngularJS app?
http://plnkr.co/edit/0R64sqdEfBPUjhKu6tPK?p=preview