I have a modal view which has a form. When I try to save the model, a REST call is made and I need to close the modal view after that..
self.myModel.url = "api/myClass/";
self.myModel.save({
success: function() {
self.trigger("afterSave");
self.removeModal();
}
}).fail(function() {
$('#save', self.el).button('reset');
});
Now my REST API code is executed fine...I have debugged on the last return statement from REST resource.. But my JS code does not go inside the success callback function.
Am I doing something wrong with the JS syntax?