In this case does anyone know how to update $scope.list with specific "id" with the code below after it successfully sent a post request to Recheck services it query again and reload all the DOM. I want to know how can we make a change only to specific element. Thanks!
function TrackingList($scope, List, Recheck) {
$scope.list = List.query();
$scope.update = function(id) {
Recheck.save({id: id}, function(){
$scope.list = List.query();
});
}
}
@mark-rajcok is correct, it is unnecessary to requery your list. Your restful service should be returning the object that contains the updates. It should match the structure of your Recheck object. Unless you have something else to do, your success function is unnecessary.