What causes the “control.registerOnChange is not a function” error

后端 未结 10 2067
一向
一向 2020-12-01 20:39

I have a form using the reactive form approach. The form is created as follow in my pug:

form([formGroup]=\'form\', novalidate=\'\', (ngSubmit)=\'postSurvey(         


        
10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-01 21:20

    This error also appears when we use a reactive form inside ng-template in conjunction with *ngIf.

    To avoid this use ng-container and do not use ngElse.

提交回复
热议问题