Angular/Ionic noob here. I have looked everywhere online (especially this site as it has been so helpful) and cannot find someone with this same issue. What I want to do is have a single array of tasks in my ts component and then have four different places in my html template where I display those tasks depending on what kind of task it is (using ngif to determine which block they should end up in).
I have a wizardTasks array of tasks in my ts component and each task is an object with a name, a type, a frequency, and an "additional" property containing any extra info about the task.
So, from that array, my code to display that looks something like this:
<ion-item-group>
<ion-item *ngFor="let task of wizardTasks">
<ion-label *ngIf="task.frequency==='oneTimeOnly' && task.type==='biological/physical'">{{task.name}}</ion-label>
<ion-label *ngIf="task.frequency==='everyDay' && task.type==='biological/physical'">{{task.name}} every day</ion-label>
<ion-label *ngIf="task.frequency==='daysOfWeek' && task.type==='biological/physical'">{{task.name}} every {{task.additional}}</ion-label>
<ion-label *ngIf="task.frequency==='specificDate' && task.type==='biological/physical'">{{task.name}} on {{task.additional}}</ion-label>
</ion-item>
</ion-item-group>
Except there are FOUR of these blocks where the ngIf task.type is one of the four groups.
The problem I am having is that when I do this it is adding a space for each entry in all four places. So if I have four tasks, one of each type, it would display each task in the appropriate block, but it would have spaces in each block for where the other tasks would be if they were in that block.
I hope that makes sense. Please let me know if I need to add anything else and thank you for any help!
screenshot if it helps...

<ng-container>for the wrapping blocks if I'm understanding you right. You could also potentially enhance some of your template with an[ngSwitch].<ion-item>if the task type doesn't match? You can create a filter for the*ngForstatement. Component code:getWizardTasks(type: string): WizardTask[] {return this.wizardTasks.filter(task => task.type === type);}. Template attribute:*ngFor="let task of getWizardTasks('biological/physical')".