title: How to retrieve nested data with Angularjs ng-repeat in Firebase?
body: <p>I am seriously having a hard time retrieving nested data from Firebase with AngularJS. I try to save data this way in Firebase, btw I am using Angularfire to save and retrieve data from the database. How can I retrieve the value of foo with ng-repeat? I also find that the documentations is scarce and tutorials are outdated. I like the real time updates and that is why I want to use it. There are no errors in the console btw. Thanks in advance for any suggestions.</p>
  
  <pre><code> --Unique id   
        --0
           --foo:"bar"   
        --1
           --foo:"bar"
  </code></pre>
  
  <p>Now when I do this in my HTML it gives me back the index number:</p>
  
  <pre><code>&lt;div ng-repeat="(item, id) in list"&gt;
      &lt;span&gt;{{item}}&lt;/span&gt;&lt;button ng-click="remove(id)"&gt;x&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But when I do this, it does not give me the values of foo:</p>
  
  <pre><code>&lt;div ng-repeat="(item, id) in list"&gt;
      &lt;span&gt;{{item.foo}}&lt;/span&gt;&lt;button ng-click="remove(id)"&gt;x&lt;/button&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>angular.module("app", ['firebase'])
      .controller("ctrl", function ($firebase, $scope) {
  
      var ref = new Firebase('https://testing12344.firebaseio.com/');
      var x=[{foo:"bar"}, {foo:"bar"}];
      var sync = $firebase(ref);
      var list = sync.$asArray();
      list.$add(x);
  
      $scope.list = list;
          console.log($scope.list);
      $scope.remove = function (id){
          list.$remove(id);
          }   
  
      })  
  </code></pre>