title: Retriving item by id Firebase using AngularFire
body: <p>I'm trying to search for an item with id, but I receive this message. All functions are working normally. When executed I get this error:</p>
  
  <blockquote>
    <p>Storing data using array indices in Firebase can result in unexpected
    behavior. See
    <a href="https://www.firebase.com/docs/web/guide/understanding-data.html#section-arrays-in-firebase" rel="nofollow">https://www.firebase.com/docs/web/guide/understanding-data.html#section-arrays-in-firebase</a>
    for more information.</p>
  </blockquote>
  
  <p>MY FACTORY</p>
  
  <pre><code>.factory('TEST', function ($firebaseArray) {
  
      var ref = new Firebase('https://shark-firebase.firebaseio.com');
  
      return {
          all: function(section) {
              var data = $firebaseArray(ref.child(section));
              return data;
          },
          get: function(section, id) {
              var data = $firebaseArray(ref.child(section).child(id));
              return data;
          }
      };
  });
  </code></pre>
  
  <p>I TRY TOGETHER:</p>
  
  <pre><code>        get: function(section, id) {
              var data = $firebaseArray(ref.child(section));
              return data.$getRecord(id);
          }
  </code></pre>
  
  <p>AND MY CONTROLLER:</p>
  
  <p>in case, $stateParams.section = 'posts' and $stateParams.id = '0'.</p>
  
  <pre><code>$scope.loadItem = function(){
      $scope.item = TEST.get($stateParams.section, $stateParams.id);
  };
  </code></pre>