I've been working on properly synchronizing my Angular service with Firebase. To achieve this, I am utilizing angularFireCollection along with an initial load callback function. My goal is to preload additional data based on the results of the first query. However, I am facing challenges in accessing the fetched data within the callback function:
getGroupIds: function() {
var deferred = $q.defer();
var ref = new Firebase('https://<XXX>.firebaseio.com/groups');
angularFireCollection(ref, function(groups) {
console.log(groups);
deferred.resolve(groups);
});
return deferred.promise;
}
Could someone provide guidance on how to access the actual data from the 'groups' object in the above example? Your help is greatly appreciated.