Using Angularjs $http in browser console -


i've testing angularjs services in browser console during development quick verification. way inject service console describe in this question or

var $inj = angular.injector(['myapp']); var serv = $inj.get('myservice'); serv.dosomething(); 

that working angularjs 1.0.7. however, after upgrading 1.1.5, doesn't work anymore services uses $http service, no xhr sent.

i've tested injecting $http directly, doesn't work. angularjs changelog seems have no record on issue. may know what's problem here?

update:

it seems angularjs 1.0.7 uncompressed version doesn't work well. tested working version angularjs 1.0.7 minified.

it works uncompressed also.

$http = angular.element(document.body).injector().get('$http'); 

then

$http.get(...) // or post or whatever 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -