AngularJS: PUT send data with URL but not as JSON data

后端 未结 2 472
南旧
南旧 2021-01-07 12:06

Here is my UserService

angular.module(\'userServices\', [\'ngResource\']).factory(\'User\', function($resource) {
  return $resource(\'/users/:u         


        
2条回答
  •  孤独总比滥情好
    2021-01-07 12:47

    I would suggest you make the following change to your update declaration:

    {update: {method: 'PUT', data:{profile:'@profile'}, isArray: false}}

    Check out the network tab on this plunker. -v.1.1.5

    Here is the same example on stable version 1.0.7.

提交回复
热议问题