Skip to content

Instantly share code, notes, and snippets.

@qetr1ck-op
Created September 6, 2015 11:27
Show Gist options
  • Select an option

  • Save qetr1ck-op/641f588b6820a1f3de81 to your computer and use it in GitHub Desktop.

Select an option

Save qetr1ck-op/641f588b6820a1f3de81 to your computer and use it in GitHub Desktop.
var underscore = angular.module('underscore', []);
underscore.factory('_', function() {
return window._; //Underscore must already be loaded on the page
});
var app = angular.module('app', ['underscore']);
app.controller('MainCtrl', ['$scope', '_', function($scope, _) {
init = function() {
_.keys($scope);
}
init();
}]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment