resolve: {
document: function ($stateParams, specialGet, $http) {
var id = $stateParams.id
return specialGet(id)
},
},
.factory('specialGet', function (Pusher, $q, $http) {
return function (id) {
return
$http.get('/api/document/'+id)
}
})
Upon injecting the document into my controller, I receive an object with various properties:
config: Object
data: Object
headers: function (name) {
status: 200
statusText: "OK"
Is there a way to only pass the data property into the document instead of receiving the entire object and extracting the data afterwards?