Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 6e60c7f

Browse files
committed
Merge pull request #170 from ajoslin/patch-1
fix(angularFireCollection): Call initialCb in a $timeout so digest fires
2 parents 4041dad + 24e0af7 commit 6e60c7f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

angularfire.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,9 @@ angular.module("firebase").factory("angularFireCollection", ["$timeout",
301301

302302
// Trigger the initial callback, if one was provided.
303303
if (initialCb && typeof initialCb == "function") {
304-
collectionRef.once("value", initialCb);
304+
collectionRef.once("value", function() {
305+
$timeout(initialCb);
306+
});
305307
}
306308

307309
// Attach handlers for remote child added, removed, changed and moved

0 commit comments

Comments
 (0)