In my Angular program, I'm trying to print out a table for each person in an array that includes all of the days they have taken off. The array with the employees in it is empInfo and the array with the days they have taken off is ptoData. The field in both arrays is EmpKey.
Here's what I've tried so far:
<div class="panel-body" style="padding-left: 0px;" *ngFor="let emp of empInfo"> <table> <thead> <tr>Employee: {{emp.EmpKey}} {{emp.FirstName}} {{emp.LastName}}</tr> <tr> <td>Date</td> <td>Hours</td> <td>Scheduled</td> <td>Notes</td> </tr> </thead> <tbody> <ng-container *ngIf="pto.EmpKey === emp.EmpKey"> <ng-container *ngFor="let pto of of ptoData"> <tr> <td>{{pto.date}}</td> <td>{{pto.hours}}</td> <td>{{pto.scheduled}}</td> <td>{{pto.notes}}</td> </tr> </ng-container> </ng-container> </tbody> </table> </div> but here's all that it's printing out:
If I remove <ng-container *ngIf="pto.EmpKey === emp.EmpKey"></ng-container>, it prints out this (which is still not what I'm looking for obviously, but it at least prints out the names):


*ngFor="let pto of of ptoData"looks wrong. Also the order of*ngIfand*ngForseems wrong too.