标签: angularjs httpservice angular-http urlbinding
我需要发出ajax请求。我可以这样做:
var categoryId = 152; var url = "/someurl/category/"+categoryId; $http.get(url);
是否可以使用$ http绑定?类似的东西:
$http.get("/someurl/category/:categoryId", {categoryId: 152});
答案 0 :(得分:0)
继续发表评论:
tim示例:
var url = tim("/someurl/category/{{categoryId}}",{categoryId:152}); $http.get(url);