Donmclean
2/5/2016 - 2:14 AM

Use lodash and other window libs in angular.

Use lodash and other window libs in angular.

var myapp = angular.module('myApp', [])
  // allow DI for use in controllers, unit tests
  .constant('_', window._)
  // use in views, ng-repeat="x in _.range(3)"
  .run(function ($rootScope) {
     $rootScope._ = window._;
  });