Callbacks are called asynchronously, so they do not occur within the scope of the Angular digest. Thus, they will not be applied to the page until a new compilation appears.
, angularFire , - $timeout(), Angular . . :
$scope.authorizedUsers = [];
fbRef.child('folders/').child($routeParams.folderID).once('value',
function(ss) {
ss.forEach(function(childSnapshot) {
fbRef.child('users/').child(childSnapshot.name()).once('value',
function(user) {
$timeout(function() {
$scope.authorizedUsers.push(user.val());
console.log($scope.authorizedUsers);
});
});
});
});