ngModel cannot be used to register form controls with a parent formGroup directive

前端 未结 10 2016
猫巷女王i
猫巷女王i 2020-12-04 17:21

After upgrading to RC5 we began getting this error:

ngModel cannot be used to register form controls with a parent formGroup 
 directive.
Try using formGroup\         


        
10条回答
  •  有刺的猬
    2020-12-04 18:02

    It looks like you're using ngModel on the same form field as formControlName. Support for using the ngModel input property and ngModelChange event with reactive form directives has been deprecated in Angular v6 and will be removed in Angular v7

提交回复
热议问题