1

I am using firebase for a project and I am trying to get all of my objects from the database, I am running this piece of code to get them:

var ref = new Firebase("https://<fire-base-database>.firebaseio.com/games");
$scope.games = $firebaseArray(ref);

I am getting the objects correctly but when I try to access their ID's with .$id I am not getting any data back...

Is there any way of getting the object unique id (which looks something like JlTq-W2RtWpOuKb2_Gp)? I need it to show the detail view of the item when someone clicks on it.

Thank you in advance!

1 Answer 1

5

I managed to solve this by getting the key in the ng-repeat like (key, games) in games and it gave me access the key.

1
  • Nice approach. Thanks Commented Nov 9, 2016 at 11:32

Not the answer you're looking for? Browse other questions tagged or ask your own question.