-
get it
bower install angular-lodash-module
-
Add angular-lodash-module.js to your main file (index.html)
-
Add the module as a dependency in your App definition
var myapp = angular.module('MyApp', ['lodash'])
-
To use, add as an injected dependency to your Controller/Service and it is ready to use
angular.module('MyApp') .controller('MyCtrl', function ($scope, _) { ... //Use lodash _.each(...); ...
References:
Lodash: http://lodash.com/ Stackoverflow: http://stackoverflow.com/questions/14968297/use-underscore-inside-controllers Github: https://github.com/kmc059000/angular-lodash-module