I have created an ion-modal which contains some replies. The user has the option to add a reply and send it to the server.
I want the $scope.replies to be updated with the new reply.
newReply.$save(newReply, function(data){
$scope.refreshData();
}, function(error){
//code
}
})
refreshData() actually works and when I close the modal and open it again I can see the new reply.
But I want it to be done automatically. Also doesn't update the data.
Any help?
I have created an ion-modal which contains some replies. The user has the option to add a reply and send it to the server.
I want the $scope.replies to be updated with the new reply.
refreshData() actually works and when I close the modal and open it again I can see the new reply.
But I want it to be done automatically. Also doesn't update the data.
Any help?