визуализировать многомерный массив в html в angular? - PullRequest
0 голосов
/ 03 мая 2020

Я получил этот многомерный массив из поиска в firestore.

getschedule(){
this.ScheduleDocument = this.usuariosser.getspecificschedule(this.id,this.id_horario);
this.ScheduleObservable = this.ScheduleDocument.valueChanges();
let that=this;
this.ScheduleDocument.snapshotChanges().subscribe(
  function(res){
    if(that.horario.length==0){
      that.horario=res.payload.data().horario;
      console.log(that.horario);
    }
    else{
      that.horario=[];
      that.horario=res.payload.data().horario;
    }
  }      
);}}

Когда я печатаю «That.horario», результат похож на:

enter image description here

Как я могу напечатать в списке ионов дни и часы в днях соответственно в html ?, это мой код html.

<ion-card *ngFor="let item of horario ; let i=index">
<ion-list  >
  <ion-item>
    <ion-label>{{item.dia}}</ion-label>
  </ion-item>
  <ion-item *ngFor="let items of item.horas">
    <ion-label>{{items.horas}}</ion-label>
  </ion-item>
</ion-list>
</ion-card>

Спасибо за вашу помощь.


Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...