title: Use underscore inside Angular controllers
body: <p>How do I use underscore library inside angularjs controllers?</p>
  
  <p>On this post: <a href="https://stackoverflow.com/questions/11943130/angularjs-limitto-by-last-2-records">AngularJS limitTo by last 2 records</a>
   somebody suggested to assign an _ variable to the rootScope so that the library will be available to all the scopes within the app. </p>
  
  <p>But I'm not clear where to do it. I mean should it go on the app module declaration? i.e: </p>
  
  <pre><code>var myapp = angular.module('offersApp', [])
              .config(['$rootScope', function($rootScope) { }
  </code></pre>
  
  <p>But then where do I load underscore lib? I just have on my index page the ng-app directive and script reference to both the angular-js and underscore libs?</p>
  
  <p><code>index.html</code>:</p>
  
  <pre><code>&lt;head&gt;
  &lt;/head&gt;
  &lt;body ng-app="offersApp"&gt;
  ...
  &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/vendor/angular.js"&gt;&lt;/script&gt;
  &lt;script src="scripts/vendor/underscore.js"&gt;&lt;/script&gt;
  ...  
  </code></pre>
  
  <p>How do I achieve this?</p>