Using Angularjs $http in browser console

后端 未结 1 1878
有刺的猬
有刺的猬 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)
提交回复
热议问题