Created
October 6, 2013 07:13
-
-
Save mlakkadshaw/6850612 to your computer and use it in GitHub Desktop.
Using underscoreJS with angular
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var underscore = angular.module('underscore', []); | |
underscore.factory('_', function() { | |
return window._; // assumes underscore has already been loaded on the page | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use the value method - underscore.value('_', _);