Forked from chrishokamp/injecting $http in the console
Last active
August 29, 2015 14:16
-
-
Save dac09/041b636dc6e0bd659107 to your computer and use it in GitHub Desktop.
injecting $http in the console Angular JS
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 angularAppName = 'angularStore'; //replace this with your app name | |
var $inj = angular.injector([angularAppName]); | |
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