1

How to merge results of two queries using FirebaseArray

I have taken data from firebase

$scope.concepts = firebasearray(ref);

Have taken data from second firebase query in a similar way.

Both are displaying list. But second list is showing for the last element and its repeating same for every element of first ref call.

In html

<li ng-repeat="(concept) in concepts">
<h3 ng-model="concept.name">{{concept.conceptname}}</h3>
<div class="row" ng-repeat="count in count">
<a ng-href="#/edit/{{concept.$id}}/" target="_blank">Page {{count.id}}</a>
</div>
</li>

The firebase structures are:

Concept:
 ConceptId
   ConceptName

Content
   ConceptId
      ContentId
          Page id
             Text

How can I fetch the page id from another database structure to show with the concept name fetched from another database structure?

Mohil
  • 189
  • 6
  • I suppose `concept` is an element from `concepts` array that comes from firebase? and each `concept` also has this `$id` attribute? and lastly what is `(conc)`? – Minato Mar 04 '16 at 07:23
  • See http://stackoverflow.com/questions/30299972/joining-data-between-paths-based-on-id-using-angularfire – Frank van Puffelen Mar 04 '16 at 07:48

0 Answers0