select 中的默认选项,具有反应形式

Default option in select, with reactive forms

我的 select 中有一个选项可以过滤我的所有结果和其他选项列表,我可以从我的列表中设置默认选项,但不能将第一个 mat-option 设置为默认选项。我该怎么做?

  <mat-form-field class="col-md-12 p-0 pb-2">
    <mat-select formControlName="carControl">
      <mat-option value="0">(All)</mat-option>
      <mat-option *ngFor="let item of data.filteredListOfCars" [value]="item" ngDefaultControl>
        {{this.codeListService.getNameOfManufacturerById(item.manufacturerId)}} {{item.model}} {{item.ecv}}
      </mat-option>
    </mat-select>
  </mat-form-field>

我正在设置这样的默认值

selectValueInControl(){
    this.filterFormGroup.get('statusControl').setValue(0);
} 

使用[value]="0"代替value="0"

<mat-option [value]="0">(All)</mat-option>