ionic2 - Accessing array in component from ionic view -


this.tribesprovider.getmytribedetailsbytriberid().subscribe(tribeids=>{      tribeids.foreach(tribeid=>{          this.tribesprovider.getmytribedetailsbytribeid(tribeid).subscribe(tribe=>{              this.mytribelist.push(tribe);              console.log(this.mytribelist);          })       })  }) 

i have access array mytribelist view this

<ion-item *ngfor="let tribe of mytribelist">     <ion-list>       <h2>{{tribe.tribedesc}}</h2>       <h2>{{tribe.tribename}}</h2>       <h2>{{tribe.created}}</h2>       <h2>{{tribe.updated}}</h2>      </ion-list>   </ion-item> 

but above code not possible. suggestions?

update issue occurs because doing

 this.angularfire.database.list  

for getmytribedetailsbytribeid(tribeid) method instead of

this.angularfire.database.object 

which in turn generated additional array of objects

 -array      -array         -object      -array          -object 


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -