After Add below code for dropdown validation
{{prot.Group}}
Enter Country ...
getting below error.
ERROR Error: "
ngModel cannot be used to register form controls with a parent formGroup directive. Try using
formGroup's partner directive "formControlName" instead. Example:
In your class:
this.myGroup = new FormGroup({
firstName: new FormControl()
});
Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:
Example:
"
Angular 9
View_groupComponent_2 groupComponent.html:82
Angular 32
RxJS 5
Angular 11
groupComponent.html:74:37
ERROR CONTEXT
Object { view: {…}, nodeIndex: 49, nodeDef: {…}, elDef: {…}, elView: {…} }
groupComponent.html:74:37
ERROR Error: "
ngModel cannot be used to register form controls with a parent formGroup directive. Try using
formGroup's partner directive "formControlName" instead. Example:
In your class:
this.myGroup = new FormGroup({
firstName: new FormControl()
});
Or, if you'd like to avoid registering this form control, indicate that it's standalone in ngModelOptions:
Example:
"

Siddharth GajbhiyePosted Dec 17, 2019, 8:02 AM