Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49235

How can multiple loops can be used in virtual Scroll ionic 4

$
0
0
<div class="grid-container" id="content" #gridContainer>
      <div #content>
        <ion-grid>
          <ion-virtual-scroll [items]="state.calendar">
            <ion-row class="calendar-date" *ngFor="let month of state.calendar;let i=index"> 
              <div class="calendar-header" style="width: 100%;">
                {{ month.monthName }} {{ month.year }}
              </div>
              <div *ngFor="let day of month.days" class="calendar-col">
                <span class="day-span" [style.color]="day.isMarked===1 ? 'white' : '#36485B'">
                  {{day.value}}
                </span>
              </div>
            </ion-row>
            </ion-virtual-scroll>
          </ion-grid>
          <div style="width:100%; height:3em;"></div>
      </div>
    </div>

I have to use two a loop with in ion-virtual-scroll, Using this approach it is giving me days undefined error at ngFor="let day of month.days. Can somebody help me out at this. Thanks

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49235

Trending Articles