var createAttendances = function(){
var stud = StudentResource.get(function(data){
$scope.students = data.students;
console.log($scope.students);
});
console.log(stud.students);
console.log($scope.sudents);
};
inside resource get function it prints out Array of two objects (which is good) outside resource get it prints out undefined
it sees stud object but when i query to students params it returns undefined
as u can see main problem is to get $scope.students or data.students ouside StudentResouce.get func