How to do a $http GET with some data in AngularJS?

后端 未结 4 1710
忘了有多久
忘了有多久 2021-01-04 21:26

I want to make a Get request to my Backend, but I want to verify some user credentials before sending the response object.

Here is my code:

$scope.ge         


        
4条回答
  •  梦毁少年i
    2021-01-04 22:20

    For $http.get requests use the params property of the config object

    $http.get(url, {params:{ foo:'bar'}}).then(func....
    

    See the Arguments table in Usage section of $http docs

提交回复
热议问题