Created
December 11, 2013 00:24
-
-
Save chrishokamp/7902972 to your computer and use it in GitHub Desktop.
how to inject $http into the console for an Angular app
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 $inj = angular.injector(['App']); | |
var serv = $inj.get('$http'); | |
var x = serv({method: 'POST', url: 'http://127.0.0.1:5000'}).success(function(data){console.log(data)}).error(function(data, status, header){ console.log(data); console.log(status); console.log(header);}); | |
console.log(x); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment