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)
}
})
When I inject document into my controller I get an object with these properties
config: Object
data: Object
headers: function (name) {
status: 200
statusText: "OK"
How do I pass just the data into document instead of the return being this object and having to get the data afterwards?