首页 文章

更改标签中的阿拉伯字体系列以及mat-select和mat-input Material angular 5的选项

提问于
浏览
0

如何更改标签中的fonts-family以及mat-select和mat-input Material angular 5的选项?

我试图将样式直接应用于mat-select和input元素,但对我来说没什么用 .

myForm的-component.html

<mat-form-field class="col-sm-2 col-4">
  <mat-select style="font-family: 'GE-Flow-Bold', sans-serif; font-size:12px" [ngModel]="selectedCivilite" formControlName='civiliteAr' (ngModelChange)="civiliteChanged($event)" placeholder="اللقب" >
    <mat-option style="font-family: 'GE-Flow-Bold', sans-serif; font-size:12px" [value]="v" *ngFor='let v of listCiviliteAr , index as i '>
      {{ v }}
    </mat-option>
  </mat-select>
</mat-form-field>
<mat-form-field  class="col-sm-5 col-8 arabic-text">
  <input style="font-family: 'GE-Flow-Bold', sans-serif; font-size:12px"  matInput formControlName='nomAr' placeholder="الإسم الشخصي" >
  <mat-error *ngIf="form.get('nomAr').invalid">{{getErrorNameArMessage()}}</mat-error>
</mat-form-field>

1 回答

  • 0

    将此样式添加到 mat-form-field

    font-family: 'GE-Flow-Bold', sans-serif
    

    应该做的伎俩 . 请记住,必须加载字体才能使其适用于您的应用程序 .

相关问题