TypeScript-'s Angular Framework Error - “There is no directive with exportAs set to ngForm”

前端 未结 22 1726
轻奢々
轻奢々 2020-12-04 09:18

I keep getting this error while using TypeScript\'s Angular2-forms framework:

There is no directive with \"exportAs\" set to \"ngForm

22条回答
  •  悲哀的现实
    2020-12-04 09:39

    Simple if you have not import module then import and declare import { FormsModule } from '@angular/forms';

    and if you did then you just need to remove formControlName='whatever' from input fields.

提交回复
热议问题