title: Cannot read property 'list' of undefined
body: <p>I am using this method to query if the calculated distance is lesser than the limit. Then it will execute this query method passing back to request.html page. Or is there any other way to execute the query if only the calculated distance is lesser than the limit then it will do the query passing back to request.html page.</p>
  
  <pre><code>this.getRequest = this.angFire.list('request', {
        query: {
          orderByChild: 'reqdetails',
          startAt: 'reqdetails'
        }
      })
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <p><a href="https://i.stack.imgur.com/9c0KK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9c0KK.png" alt="enter image description here"></a></p>
  
  <p>My openMapPage() method:</p>
  
  <pre><code>     openMapPage()
        { 
  
          // GETTING THE CURRENT USER ADDRESS FOR LATITUDE AND LONGTITUDE
          var uid = firebase.auth().currentUser.uid;
          var ref = firebase.database().ref("request/" + uid);
          ref.once("value").then((snapshot) =&gt; { // &lt;------ Here!
              var a = snapshot.exists();  // true
              var c = snapshot.hasChild("reqdetails"); // true
              var d = snapshot.child('reqdetails').exists();
              var requestsKey = snapshot.key;
              var requestsValue = snapshot.val();
  
  
             ref.once('value', (request) =&gt; {
        var currentUserAddress = request.val().regdetails.address;
        var geocoder = new google.maps.Geocoder();
  
        geocoder.geocode( { 'address': currentUserAddress}, function(results, status) {
          if (status == google.maps.GeocoderStatus.OK) {
            var latitude = results[0].geometry.location.lat();
            var longitude = results[0].geometry.location.lng();
            this.latlng = new google.maps.LatLng(latitude, longitude);
            //console.log("HAHAH current user");
            //var meterLimit  = this.latlng;
            //var userAddress = new LatLng(currentUserAddress);
            //console.log("SURESH IS COOL");
          } 
        }); 
  
      });           
  
      //END OF CURRENT USER 
      }); 
  
  
        // GETTING THE ALL  USER ADDRESS FOR LATITUDE AND LONGTITUDE
          var ref1 = firebase.database().ref("request");
          ref1.once("value").then((snapshot1) =&gt; { // &lt;------ Here!
              var a = snapshot1.exists();  // true
              var c = snapshot1.hasChild("reqdetails"); // true
              var d = snapshot1.child('reqdetails').exists();
              var requestsKey = snapshot1.key;
              var requestsValue = snapshot1.val();
  
  
              snapshot1.forEach((childSnapshot) =&gt; { // &lt;------ And here!
                  var requestKey = childSnapshot.key;
                  var requestValue = childSnapshot.val();
                  var reqdetails = requestValue.reqdetails;
                  var AllUserAddress = requestValue.regdetails.address;
  
  
  
  
              var geocoder1 = new google.maps.Geocoder();
  
        geocoder1.geocode( { 'address': AllUserAddress}, function(results, status) {
          var limit = 10;
          if (status == google.maps.GeocoderStatus.OK) {
            var latitude1 = results[0].geometry.location.lat();
            var longitude1 = results[0].geometry.location.lng();
            this.latlng1 = new google.maps.LatLng(latitude1, longitude1);
            //var userAddress = new LatLng(currentUserAddress);
             //console.log(latlng1);
             var dist: number = parseInt((google.maps.geometry.spherical.computeDistanceBetween(this.latlng,this.latlng1) / 1000).toFixed(2));
  
  
  
             if(dist &lt; limit)
             {
               console.log(dist);
               console.log(AllUserAddress);  
  
               this.getRequest = this.angFire.list('request', {
            query: {
              orderByChild: 'reqdetails',
              startAt: 'reqdetails'
            }
          })
  
             }
  
  
          } 
        }); 
  
  
  
  
  
              });
  
  
      });
  
    }
  </code></pre>
  
  <p>My request.html page</p>
  
  <p><a href="https://i.stack.imgur.com/4dLud.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4dLud.png" alt="enter image description here"></a></p>
  
  <p>My constructor:</p>
  
  <pre><code>constructor(public navCtrl: NavController, public navParams: NavParams, private angFire: AngularFireDatabase,private af: AngularFireDatabase,
    private afAuth: AngularFireAuth) {
  
  
    }
  </code></pre>