title: How to uninject a dependency previously included using $inject in AngularJS
body: <p>I've been reading the official docs <a href="https://docs.angularjs.org/api/auto/service/" rel="nofollow">https://docs.angularjs.org/api/auto/service/</a>$injector but failed to find how to de-inject a dependency.</p>
  
  <p>My scenario:</p>
  
  <p>I have a service that authenticates users, and a number of services that only make sense for authenticated users.</p>
  
  <p>I'd like to handle a successful login-logout programatically, and inject-uninject the other services depending on whether the user is logged in.</p>
  
  <p>Does anyone know if it's possible to dynamically de-inject a dependency in an AngularJS app?</p>