Need help with displaying the selected option in mat-select using Angular 11. The scenario is as follows: I have a field named Idefault, and the condition is, if type.Idefault == true, then show the value as the selected option in mat-select.
An image has been included for your reference:
https://i.sstatic.net/f5DM3.png
<div class="col-sm-6 has-select pr-3">
<mat-form-field appearance="fill" class="pt-1 no-border">
<mat-select formControlName="source" [(ngModel)]="selectedBatchSource" (selectionChange)="changeClient($event.value)" >
<mat-option *ngFor="let type of data$ | async" [value]="type.ctype">
{{type.ctype}}
</mat-option>
</mat-select>
</mat-form-field>
</div>