I'm building a web app using Angular + Typescript. And I have ASP.NET Core Web API, I have two components one is employee and another is department,I want to run condition in 'departement',for example if i select departement IT i got all employees in this department,the problem i get just the employee in select department not all employee and i can't use *ngif and *matcelldef in same statement HTML
<mat-card>
<mat-card-header class="w-100">
    <mat-card-title-group class="w-100">
        <mat-form-field appearance="fill">
            <mat-label>{{'::Departement' | abpLocalization}}</mat-label>
            <mat-select id="author-id" Name="departementId" [(value)]="selected" autofocus>
                <mat-option [value]="departement.id" *ngFor="let departement of departements$ | async">{{ departement.name }}</mat-option>
            </mat-select>
        </mat-form-field>
    </mat-card-title-group>
</mat-card-header>
<mat-card-content>
    <table mat-table [dataSource]="employee.items" class="w-100" matSort (matSortChange)="changeSort($event)">
        <tr mat-header-row *matHeaderRowDef="columns"></tr>
        <tr mat-row *matRowDef="let myRowData; columns: columns"></tr>
        <ng-container matColumnDef="name">
            <th mat-header-cell *matHeaderCellDef mat-sort-header>
                {{'::Name' | abpLocalization}}
            </th>
            <li *ngFor="let employee of employee.items ">
                {{employee.name}}
            </li>
  <td mat-cell *matCellDef="let element"><div *ngIf="element.departementId === selected ">{{element?.name}}</div></td> 
        </ng-container>
    </table>
    <mat-paginator [length]="employee.totalCount" [pageSize]="list.maxResultCount" (page)="changePage($event)"></mat-paginator>
</mat-card-content>