Angular 5材质:以反应形式制成所需的垫式无线电基团

时间:2018-11-29 17:17:39

标签: angular angular-material angular5

试图使我的单选按钮组成为必需,但未能找到具体的方法。这是我的html代码和ts:

<mat-radio-group name="dealtype" [(ngModel)]="formType" formControlName="formType" required>
          <mat-radio-button value="New Lease">New Lease</mat-radio-button>
          <mat-radio-button value="Ground Lease-New">Ground Lease-New</mat-radio-button>
</mat-radio-group>


this.newLeaseForm = new FormGroup({
  'emailGroup': new FormControl({ value: this.selectedToAdd }),
  'emailList': new FormControl({ value: this.selectedToRemove }),
  'remarks': new FormControl({ value: this.remarks }),
  ['myControl']: new FormControl({ value: this.selectedBU.BusinessUnitId }, Validators.required),
  'formType': new FormControl(null, Validators.requiredTrue),

0 个答案:

没有答案