Created
September 25, 2015 13:09
-
-
Save richardTowers/e9e59614301c97fb0a5f to your computer and use it in GitHub Desktop.
This file contains 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 injector = angular.injector(['ng']); | |
injector.instantiate(function ($http) { | |
window.$http = $http; | |
}); | |
$http.get('https://whatever.com'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get's $http from the angular injector and exposes it globally.
Useful for debugging if you just want to play with $http in the console.