Continuation of this questions is hereAngular 6 Dynamic Forms issue [part 2]推荐答案您声明要填写表格form: FormGroup;但是忘了实例化.您做到了But forgot to instanciate it. You did thisthis.form = this.qcs.toFormGroup(...);但是您正在等待HTTP调用完成,这意味着在调用完成之前它是未定义的.But you are waiting for your HTTP call to complete, meaning that it's undefined until the call is done.考虑对HTML进行调整:Consider conditioning your HTML :<form [formGroup]="form" *ngIf="form">对于沙箱,请考虑使用 http://stackblitz.ioBy the way, for sandboxes, consider using http://stackblitz.io 这篇关于Angular 6动态表单问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的..
09-07 01:36