I am using mat select in angular 11. Can anyone help me out to show selected option in mat-select. I have a field named Idefault and a condition is, IF type.Idefault == true then show value as selected option in mat-select
Image is added for your reference
<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>
this.selectedBatchSource
in your component to assign the default? – Kinglish