javascript - Return value from firebase in ng-repeat -
i use angularjs front-end , firebase database. i have ng-repeat displays firebasearray of stories. each of these stories connected number of collections can part of. collections , stories stored in 2 different locations on firebase server , use keys tie these together. my model story object in database looks this: storyid: { title: 'title', in_collections: { 0: collectionid //collection id refers specific collection in database 1: collectionid } } so whenever display story object don't have access title, id. in order title need call server name. have this: template: <div> {{story.title}} in collections: <span ng-repeat="(key, collection) in story.in_collections"> {{getcollectiontitle(key)}} <span> </div> controller: app.controller("explorectrl", function($scope, stories, collections){ $scope.story = stories.getstory(storyid); //comes firebase array $scope.getcollecti...