I am trying to display list of options using ngFor but only fulfilling certain condition, is it possible to use ngFor and ngIf together to achieve that? Something like this:
<ion-select [(ngModel)]="task">
<ion-option *ngFor="let task of tasks" [value]="task" *ngIf="task.ProjectId == project.Id">{{task.Title}}</ion-option>
</ion-select>
*ngFor and *ngIf cannot be used together on the same element.
What you can do is use an ng-container.
<ng-container>is a logical container that can be used to group nodes but is not rendered in the DOM tree as a node.
<ng-container>is rendered as an HTML comment.
<ion-select [(ngModel)]="task">
<ng-container *ngFor="let task of tasks">
<ion-option [value]="task" *ngIf="task.ProjectId == project.Id">{{task.Title}}</ion-option>
</ng-container>
</ion-select>