我在我的Angular应用程序中使用了mat-select。我想更改文本的颜色,但颜色不变。
<mat-select style="color: red" [(ngModel)]="someValue">
<mat-option>class="empty-select"</mat-option>
<mat-option class="not-empty-select" *ngFor="let unit of units [value]="unit">{
我有一个自定义组件,它是mat-select的包装。如何在其他组件中使用它?我读了一些关于formControl和controlValueAccessor的文章,但我不太懂。 我的custom.html <mat-select>
<mat-option [value]="opt" *ngFor="let op of opt; index as i">{{opt[i]}}</mat-option>
</mat-select>
<input matInput> 我的custom.ts import