4 ms·
If 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 a
by andreasklinger 13y ago
If 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...