When controlling two mat tabs with a statement, I encountered an interesting issue. Both mat-tab elements contain a card-list and are controlled with a statement in ng-container. Strangely, on the first tab, the card has a slight margin from the top when I hover over it, showing 'ng-star-inserted'. The opposite logic applies to the second mat-tab card element, as it has a margin from the bottom. If I remove '
Margin on top (Active appointments tab)
https://i.sstatic.net/DHszE.jpg
<ng-container *ngIf="!appointment.passed">
Margin on bottom (Past appointments tab)
https://i.sstatic.net/17CK9.jpg
<ng-container *ngIf="appointment.passed">
Appointments array below (each object has a passed value indicating if it has passed or not)
0: {id: 36, appointmentDate: "2019-12-27T10:28:15", doctorName: "Conner Reyes", departmentName: "Urology", hospitalName: "Genopkins Hospital", …}
1: {id: 57, appointmentDate: "2020-01-03T08:29:25", doctorName: "Ayesha Brewer", departmentName: "Eye Center", hospitalName: "Genopkins Hospital", …}
2: {id: 40, appointmentDate: "2020-01-11T17:23:39", doctorName: "Shelbie Jenkins", departmentName: "Gynecologic Oncology", hospitalName: "Genopkins Hospital", …}
3: {id: 58, appointmentDate: "2020-01-15T15:45:19", doctorName: "Kirsty Armstrong", departmentName: "Eye Center", hospitalName: "Genopkins Hospital", …}
4: {id: 93, appointmentDate: "2020-01-16T17:26:27", doctorName: "Claire Burton", departmentName: "Eye Center", hospitalName: "Mediclinic Hospital", …}