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

前端 未结 10 2062
猫巷女王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:06

    I just got this error because I did not enclose all my form controls within a div with a formGroup attribute.

    For example, this will throw an error

    This can be quite easy to miss if its a particularly long form.

提交回复
热议问题