I return a resource with a URL
$resource(\"http://foo.com/bar.json\").get().
$promise.then(function(data){ $scope.result = data},
$resource
returns an object or array that will have your data when the call completes. All those functions are there to help you out and $resource
is mainly intended for CRUD operations. If you want the data, you have to wait for it to get returned so you might as well use the promise. If you want to strip all of those properties you can use angular.toJson to convert it to json, but angular does that for you when posting it back to a resource or $http call so you shouldn't have to.
$scope.data = $resource("http://foo.com/bar.json").get();
// $scope.data does not have your data yet, it will be
// populated with your data when the AJAX call completes
...
// later in a call from a save button maybe you can just do
// this to post your changes back:
$scope.data.$save();