Q:

Accessing private $$state variable in angularjs

I am trying to access multiple users via http request.
But the needed data is nested in a private $$state variable which i cant access.
console log

getMembers: function (circleId) {
                var deferred = $q.defer();
                $http.get('/circle/' + circleId + '/user')
                    .success(function (members) {
                        deferred.resolve(members);
                    })
                    .error(function (error) {
                        deferred.reject(error);
                    });
                return deferred.promise;
            },

A:

If you're getting a $$state object, you are probably directly accessing the promise being returned from the getMembers() function as you've written it. Remember that a promise is asynchronous. To access data in a promise you need to use a callback function to access the data upon return of the promise.
Example with error:
response = getMembers(circleId);    
console.log(response); // the data is NOT in this response

Correct approach:
getMembers(circleId).then(function(response) {
    console.log(response);       // the data IS in this response
    $scope.data = response.data; // or something like that
});

