0
我執行以下火力地堡查詢:是否可以檢測Firebase快照何時執行?
var getAdmin = function() {
var rootRef = new Firebase(FIREBASE_URI),
adminList = [],
deferred = $q.defer();
rootRef.child('user').orderByChild('role').startAt(21).once('child_added', function (administrator) {
// Add each Administrator to Admin List
adminList.push(administrator);
});
// deferred.resolve(?)
return deferred.promise;
};
我想解決與管理員列表的承諾。如何檢測Firebase快照何時完全執行?
的可能的複製[如何在火力地堡DB丟棄初始數據](http://stackoverflow.com/questions/19883736/how-to-discard-initial-data-in-a-firebase-db ) – Kato