title: AngularJS: Using third party libraries without exposing a global variable
body: <p>What is the best way to use a third party library in Angular without exposing a global variable?</p>
  
  <p>For instance, if I were using underscore.js, I want to inject _ into only the controllers that use it.</p>
  
  <pre><code>angular.module('module').controller(function(_) {
    // _ is injected only into this scope
  };
  </code></pre>
  
  <p>To get this effect, I've seen some people load underscore globally with a script tag, then create a service like this:</p>
  
  <pre><code>myModule.factory('_', function ($window) {
      return $window._;
  });
  </code></pre>
  
  <p>However, this still pollutes the global scope with _.</p>
  
  <p>Is there an 'Angular way' of registering and injecting third party libraries without causing this problem?</p>