Counter in second *ngFor


<ion-col col-1 *ngFor="let day of wvdaysInThisWeek">
  <span *ngFor="let event of appEvents | async index as i">
    <span *ngIf="( == (day.DayNr)"> <br>i: {{i+1}} e: {{}}</span>

Is there any posibilities for show number of events per day instead of names for the events?

Now I have:

And I want to have something like this:

I would shift all the work to the controller. When appEvents is populated, build up a map of days to count of events. That way the template can be as simple as {{eventCount[day]}}.

1 Like

Great, thank you:) I learned some about mapping and now works fine.