[Answered ]-How to access json return values in angular.js action success callback

2πŸ‘

βœ…

For future reference:

Angular is expecting for a successful post call that the server responds with the json representation of the resource for which we called $update or $save.

I found it here. Hidden in a comment πŸ™‚

 card.$save();
 // POST: /user/123/card/456 {id:456, number:'1234', name:'J. Smith'}
 // server returns: {id:456, number:'1234', name: 'J. Smith'};

Therefore I’m returning the json representation of the resource from the server and it works as expected.

Leave a comment