Hi Mojam,

Your post is barely readable to me, you did choose a really tiny font. if 
you post this much code, you might better use an plunker or an fiddle to 
explain your issue.
However, the problem is in your server side logic. the payload you need is 
inside a ‘post’ wrapper in the object.

public HttpResponseMessage Post(Person person)
{
    context.Persons.Add(person);
    context.SaveChanges();
    HttpResponseMessage response = 
Request.CreateResponse(HttpStatusCode.Created, person);
    response.Headers.Location = new Uri(Url.Link("DefaultApi", new { id = 
person.Id }));
    return response; 
}

I never worked with the server framework you are using, but according to 
the screenshot, I think you should change 1 line. 

context.Persons.Add(person.post);

Or otherwise get the post out of the response your are handing on the 
server.

Regards
Sander

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to