【问题标题】:How to show data from firebase: select and show on another page in ionic?如何显示来自firebase的数据:在离子的另一个页面上选择并显示?
【发布时间】:2022-06-15 03:41:18
【问题描述】:

我的主页 HomePAge

selectAuto(){ this.router.navigate(['/publicacion']); }

我的PublicacionPage PublicacionPage

this.afDB.database.ref('Carros/'+this.route.snapshot.paramMap.get('IdCarro')).on('child_added', local =>{
  
  this.Carro=local.val();
  this.Carros.splice(this.y,0,this.Carro);

  this.Carros.forEach( Ven => {
    Ven['VNombre']=''
    Ven['VTelefono']=''
    Ven['VEmail']=''
    Ven['VApellidos']=''
    
    this.afDB.database.ref('usuarios/'+Ven.Vendedor).on('value', user => { 
      Ven.VNombre=user.val().Nombre;
      Ven.VTelefono=user.val().Telefono;
      Ven.VEmail=user.val().Email;
      Ven.VApellidos=user.val().Apellidos;
    });

  });
});`

【问题讨论】:

标签: javascript firebase ionic-framework firebase-realtime-database ionic2


猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-06
  • 2018-06-16
  • 1970-01-01
  • 2021-08-02
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多