如何在不通过构建字符串
手动指定url的情况下执行此操作var memberSearchModel = {
SearchBy: "Name",
SearchValue: "jaredites"
};
dataFactory.getMembers = function () {
return $http.get(urlBase + '/' + memberSearchModel);
};
答案 0 :(得分:0)
第一个参数是url,第二个是数据:
var memberSearchModel = {
SearchBy: "Name",
SearchValue: "jaredites"
};
dataFactory.getMembers = function () {
return $http.get(urlBase, memberSearchModel);
};
请参阅$http.get文档