What is snapshotchanges in firestore

后端 未结 3 1818
悲哀的现实
悲哀的现实 2020-12-10 03:48

this function is called by the constructor. can someone explain in depth to me what it does?

  initializeItems(){
this.travelList$ = this.plsdala.getTravelLi         


        
3条回答
  •  死守一世寂寞
    2020-12-10 04:08

    To push the observables into an array do something like this.

    let travelArray = [];
    this.travelList$.subscribe(res => {
      res.map(c => {
        travelArray.push(c);
      })
    })
    console.log(travelArray);
    

提交回复
热议问题