Using Angularjs $http in browser console

后端 未结 1 1840
有刺的猬
有刺的猬 2021-02-12 14:10

I\'ve testing AngularJS services in browser console during development for quick verification. The way I inject a service into console is as describe in this question or

相关标签:
1条回答
  • 2021-02-12 14:57
    $http = angular.element(document.body).injector().get('$http');
    

    then

    $http.get(...) // or post or whatever
    
    0 讨论(0)
提交回复
热议问题