Suppose I have 2 or more async calls:
$scope.obja = {};
$scope.objb = {};
ref1.on('value', function (value) {
$scope.obja= value.val();
});
ref2.on('value', function (value) {
$scope.objb= value.val();
});
Later within the script I want to make sure that both of the $scope
variables are set before I use them.
This example code follows the firebase examples in angularjs.
Any ideas?