首页 > 解决方案 > formControlName 不保存选择中的所有值

问题描述

formControlName 仅在我的数据库中设置姓氏。如何保存姓名和姓氏?

<mat-select formControlName="date_customer">
  <mat-option *ngFor="let customer of customers" [value]="customer.forname && ' ' && customer.surname">{{ customer.forname }} {{ customer.surname }}</mat-option>
</mat-select>

标签: angularangular-reactive-formsangular-forms

解决方案


推荐阅读