angular.js - $resource problem with angular
大家讲道理
大家讲道理 2017-05-15 16:52:46
0
1
533

Service $resource('/user/:userId') If I want to post a new user, how should the service be written? Or is it that the URL cannot be like this? Doesn't it seem possible to use save({},{name:'a'}) directly?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(1)
迷茫

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 })

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template