nz-upload 标签好像不支持formControlName属性,我现在要在表单中选择图片上传,怎么用formControl控制???
HTML:
<nz-form-item>
<nz-form-label [nzSpan]="2" nzRequired>附件上传</nz-form-label>
<nz-form-control [nzSpan]="22" nzHasFeedback="false">
<div class="clearfix">
<nz-upload
formControlName="attachments"
class="upload-list-inline"
nzAction="123/posts/"
nzListType="picture"
[(nzFileList)]="fileList2">
<button nz-button type="button">
<span><i nz-icon nzType="upload"></i>上传</span>
</button>
</nz-upload>
</div>
</nz-form-control>
</nz-form-item>
ts:
form: FormGroup = this.fb.group({
id: [],
dispute: this.fb.group({
Details: ['', [Validators.required]],
attachments: ['', [Validators.required]]
}),
applicant: this.fb.group({
applicantType: ['个人', [Validators.required]],
applicantName: ['', [Validators.required]],
})
});