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

Commit c1bd781

Browse files
committed
Merge branch 'master' of https://github.com/rachelhigley/angularFire into rachelhigley-master
2 parents b6328d4 + c8bd596 commit c1bd781

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

angularFire.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,15 @@ angular.module("firebase").factory("angularFireCollection", ["$timeout",
334334
return collection[indexes[name]];
335335
};
336336

337+
// Retrieve a collection of objects by names.
338+
collection.getByNames = function(names) {
339+
var objs = [];
340+
for (var i = 0, len = names.length; i < len; i++) {
341+
objs.push(collection[indexes[names[i]]]);
342+
}
343+
return objs;
344+
};
345+
337346
// Add an object to the remote collection. Adding an object is the
338347
// equivalent of calling `push()` on a Firebase reference.
339348
collection.add = function(item, cb) {

angularfire.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)