3 ms·
Using AngularJS + UnderscoreJS
- andreasklinger 13y agoIf anyone is wondering why people use a factory here to inject it. This stackoverflow comment sums it up nicely Probably for the same reasons you inject anything, instead of putting everything in the global scope. However, since you're a lot less likely to want to substitute out your underscore library during testing than some other more specific dependency it's understandable that it doesn't seem necessary. – fess http://stackoverflow.com/questions/14968297/use-underscore-inside-controllers#comment24351367_14968873 http://stackoverflow.com/questions/14968297/use-underscore-i...
- paulyoung 13y agoWe use Underscore with Angular using this tool: https://github.com/obibring/grunt-angular-service https://github.com/obibring/grunt-angular-service An example of how is in the README.