json - AngularJS http post not sending object as expected -
i'm trying post changes row in table via form in angularjs. however, looks data selected in view not pushed object correctly, , 500 error when posting on real dev environment.
here's code
edit:
the format post is: { "id" : "1", "name" : "5k", "distance" : "3.1 miles", "date" : "3/14/2014", "time" : "8 am" }
if change save button run save()
method on scope, following request payload some/url
.
{ "name":{ "type":"afternoon", "_embedded":{ "event":{ "_links":{ "self":{ "href":"www.example.com/events/shift/2" } }, "name":"10k", "distance":"6.2 miles" } } } }
this same data in scope. such, suggest server code doing wrong data..
Comments
Post a Comment