i'm trying to access a specific position of my array of resources, that came from a query but in my console.log it doesn't appear.
$scope.a = [];
var resourceGet = $resource('myurl');
$scope.a = resourceGet.query(function(data){
return data;
}, function(error){
console.log(error);
});
console.log($scope.a[1]);
Nothing on the console. But, i can show $scope.a using ng-repeat.
What am i doing wrong?