Bridge to use Underscore as a service in an Angular Controller
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 11 commits behind andresesfm:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
README.md
angular-underscore-module.js
bower.json

README.md

angular-underscore-module - Use Underscore from an Angular Controller or Service

Usage

  1. get it

  2. Add angular-underscore-module.js to your main file (index.html)

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

var myapp = angular.module('MyApp', ['underscore'])
  1. 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 underscore _.each(...); ...


References:

Underscore:
http://underscorejs.org/
Stackoverflow:
http://stackoverflow.com/questions/14968297/use-underscore-inside-controllers
Github:
https://github.com/andresesfm/angular-underscore-module