i have a little problem returning Geofire data. i'm building a little app where users , can post something within a certain distance.
so i used geofire and firebase to do so , it was pretty easy, but i failed to return the datas
i'm loading data like this.
loadT(){
  this.geoQuery.on("key_entered", function(key, location, distance, error){
    if(error){
      console.log(error)
    }else{
      this.publicationRef.orderByKey().equalTo(key).on("child_added", (snapshot) =>{
        this.publications = snapshot.key();
        this.publicationRef.child(this.publications).orderByChild('user').on("child_added", snapshot => {
          this.__publi = snapshot.val()
          this.UsersRef.orderByKey().equalTo(this.__publi.user).on("child_added", snapshot => {
            this.Taskauthor = snapshot.val()
            this.publicationsByuser = {username : this.Taskauthor.nom, userprenom: this.Taskauthor.prenom, localisation: Math.floor(distance), Tachenom: this.__publi.nom, description: this.__publi.description, skills: this.__publi.skills}
            return this.publicationsByuser
          })
        })
      })
    }
  })
}
so this is returning the value of this.publicationsByuser, i want to pass it into an ngFor loop, but when i try to do so , the value of the data are undefined, anything is wrong with what i'm doin?
