What's wrong here?
template:
<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)]));
}
Throws:
EXCEPTION: Error in ... caused by: Expression has changed after it was checked. Previous value: 'false'. Current value: 'true'.