Created
September 6, 2015 11:27
-
-
Save qetr1ck-op/641f588b6820a1f3de81 to your computer and use it in GitHub Desktop.
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._; //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