Get data row from firestore and pass into modal

#1

Hi,

so in my feed page, when I press on a post, a modal is opened , I would then like to present the data from the post I pressed on (just the single post itself), please help

getPosts() {
    this.posts = []
    let loading = this.loadingCtrl.create({
      content: "Loading Feed..."
    })
    loading.present()
    let query = firebase.firestore().collection("posts").orderBy("created", "desc").limit(this.pageSize)
    

    query.get()
    .then((docs) => {

      docs.forEach((doc) => {
        this.posts.push(doc)
        
      })
      loading.dismiss()
        
      this.cursor = this.posts[this.posts.length -1];
      
    }).catch((err) => {
      console.log(err)
    })
  }


openModal() {
    const mapModal = this.modal.create('MapPage', { data: this.posts });
    mapModal.present();
  }

here is my repo: https://github.com/jbiddulph/pubs-feedy
feed.ts is the page I was working on