I didn’t know much about it when I first came into contact with it before服务封装return $resource('/api/user/u/:id',{id:'@id'},{update:{method:'PUT'},insert :{method : 'POST'}});
The front end calls userService.insert({},{data:...},function(data){
//callback
})
I didn’t know much about it when I first came into contact with it before
服务
封装return $resource('/api/user/u/:id',{id:'@id'},{update:{method:'PUT'},insert :{method : 'POST'}});
The front end calls
userService.insert({},{data:...},function(data){ //callback })