Skip to content

About

Bridge to use lodash as a service in an Angular Controller

Resources

Stars

8 stars

Watchers

1 watching

Forks

 
 

Latest commit

 

History

18 Commits

Folders and files

Repository files navigation

angular-lodash-module - Use Lodash from an Angular Controller or Service

Usage

  1. get it

    bower install angular-lodash-module
    
  2. Add angular-lodash-module.js to your main file (index.html)

  3. Add the module as a dependency in your App definition

    var myapp = angular.module('MyApp', ['lodash'])
  4. 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

About

Bridge to use lodash as a service in an Angular Controller

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors