Skip to content

Inject Lodash in any Angular application, and use it via the good old `_` handler.

License

Notifications You must be signed in to change notification settings

ngTrumbitta/ngtrumbitta-services-lodash

Repository files navigation

ngTrumbitta Lodash Angular service

Build Status

Inject Lodash in any Angular application, and use it via the good old _ handler.

Just a little something I find myself rewriting every time I work on an Angular application.
Well, no more I guess ;)

Install

bower install ngtrumbitta-services-lodash

Use

<script src="//code.angularjs.org/1.4.5/angular.min.js"></script>
<script src="bower_components/lodash/lodash.min.js"></script>
<script src="bowser_components/ngtrumbitta-services-lodash/src/lodash.service.js"></script>
angular.module('app.services.myservice', [
  'ngtrumbitta.services.lodash'
  ])
  .service('myService', function(_) {

    this.getMyGirls = function() {
      var myCollection = ['Buffy', 'Xander', 'Willow', 'Giles'];
      var myGirls = ['Buffy', 'Willow'];
      return _.at(myCollection, [0, 2]);
    };

  });

License

MIT – See license file

About

Inject Lodash in any Angular application, and use it via the good old `_` handler.

Resources

License

Stars

Watchers

Forks

Packages

No packages published