I want to call a function once I get my firebase data back, however, I don't see any promises function like then on the ref object. Any suggestion? Here is my code:
angular.module('myMod', ['firebase']).controller('myCtrl', ['$scope', '$firebase',
function($scope, $firebase) {
var ref = new Firebase('myfirebaseurl');
$scope.data = $firebase(ref);
// i want to do something like
data.then(function(){
someFunc();
});
// or something like
$scope.$watch('data', function(){
if($scope.data.desiredProperty) {
doSomething();
}
});
}]);