Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要发出ajax请求。我可以做这个:
var categoryId = 152; var url = "/someurl/category/"+categoryId; $http.get(url);
是否可以使用 $http 绑定?就像是:
$http.get("/someurl/category/:categoryId", {categoryId: 152});
继续我的评论:
以tim为例:
var url = tim("/someurl/category/{{categoryId}}",{categoryId:152}); $http.get(url);