我有这段代码:
postAssignUserToProject(pid: number, selectedUsers: any, uid: number) {
var me = this;
return me.Restangular.all("configure/assign").one(pid.toString()).one(uid.toString()).post(selectedUsers);
}
答案 0 :(得分:0)
你应该将它们放入一个对象中,并使用Restangular
obj = {
pid: pid.toString()
selectedUsers: selectedUsers
uid: uid.toString()
}
Restangular.one(url).post(obj).then(function(res){
// do something
})
或
Restangular.one(url).post({
pid: pid.toString()
selectedUsers: selectedUsers
uid: uid.toString()
}).then(function(res){
// do something
})
答案 1 :(得分:0)
这段代码不起作用因为我的反手服务不接受这种格式。 例如,y反手代码是: