How to pass parameters to $http in angularjs?
问题 Assume that I have two input boxes with corresponding ng-model as fname and lname. If I call http request as : $http({method:'GET', url:'/search', params:{fname: fname, lname: lname}}) will it call to the url : /search?fname=fname&lname=lname The error I am getting at the backend(python) is : cannot concatenate str and nontype objects. Are these parameters not sent as strings? If not, how to get around with this? 回答1: Here is how you do it: $http.get("/url/to/resource/", {params:{"param1":