0
我有有通過使穿上名稱不是ID
- PROFILENAME輪廓資源修改使用restangular資源,
- 名字,
- 姓氏和
- ID
這裏PROFILENAME是唯一的,用作資源標識符,id只是一個計數。
要修改資源它 http://localhost:9090/messanger/api/[profileName]
接受PUT請求現在的問題是,每當我做放置請求,它與ID替換配置文件名稱。我無法對profileName進行重新放置請求。
代碼如下。
$scope.editUser=function(id){
var profile=$scope.profiles[id];
$scope.profile=profile;
profile.save().then(function(res){
console.log(res);
});
}