Pass array of data from Angular $http POST

后端 未结 4 1127
忘掉有多难
忘掉有多难 2020-12-28 15:46

I need to pass an array of object from my Angular application to a .Net web service with Nancy framework.

I tried this :

function TestCtrl($scope, $         


        
4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-28 15:54

    you can use $httpParamSerializer or $httpParamSerializerJQLike

    $http(
        url: 'myURL',
        method: "POST",
        data: $httpParamSerializer(data),
    )
    

提交回复
热议问题