这里有什么问题?
模板:
<drr-person (isMinorEmittor)="setPersonIsMinor($event)" [group]="requesterForm" [required]="true" ></drr-person>
TS:
ngOnInit() {
if (!this.required)
this.personForm.addControl("nationalnumber", this.fb.control("", [Validators.minLength(11)]));
else
this.personForm.addControl("nationalnumber", this.fb.control("", [Validators.required, Validators.minLength(11)]));
}
抛出:
EXCEPTION:错误导致...:表达式在检查后发生了变化。上一个值:'false'。当前价值:'true'。