You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i use angular 12.1.1. hi in section 12 (reactive forms) after creating the text-input component we and declare all inputs in the ts file and implement ControlValueAccessor interface I get error in text-input HTML file when I trying to type [formControl]="ngControl.control". error message is that: Type 'AbstractControl' is missing the following properties from type 'FormControl': registerOnChange, registerOnDisabledChange, _applyFormState
text-input.component.html code:
<div class="form-group">
<input [class.is-invalid]="ngControl.touched && ngControl.invalid" type={{type}} class="form-control"
[formControl]="ngControl.control" placeholder={{label}}>
<div *ngIf="ngControl.control.errors?.required" class="invalid-feedback">Please enter a {{label}}</div>
<div *ngIf="ngControl.control.errors?.minlength" class="invalid-feedback">
{{label}} must be at least {{ngControl.control.errors.minlength['requiredLength']}}
</div>
<div *ngIf="ngControl.control.errors?.maxlength" class="invalid-feedback">
{{label}} must be at most {{ngControl.control.errors.maxlength['requiredLength']}}
</div>
<div *ngIf="ngControl.control.errors?.isMatching" class="invalid-feedback">
Passwords do not match
</div>
</div>
The text was updated successfully, but these errors were encountered:
new2690
changed the title
error: Type 'AbstractControl' is missing the following properties from type 'FormControl'
how should fix the error: Type 'AbstractControl' is missing the following properties from type 'FormControl'
Jul 22, 2021
i use angular 12.1.1. hi in section 12 (reactive forms) after creating the text-input component we and declare all inputs in the ts file and implement ControlValueAccessor interface I get error in text-input HTML file when I trying to type [formControl]="ngControl.control". error message is that:
Type 'AbstractControl' is missing the following properties from type 'FormControl': registerOnChange, registerOnDisabledChange, _applyFormState
text-input.component.html code:
text-input.component.ts code:
please help me how i should fix this thank you
The text was updated successfully, but these errors were encountered: