Can't bind to 'ngModel' since it isn't a known property of 'input'

前端 未结 30 1419
予麋鹿
予麋鹿 2020-11-22 12:44

I\'ve got the following error when launching my Angular app, even if the component is not displayed.

I have to comment out the so that my

30条回答
  •  野性不改
    2020-11-22 13:05

    In order to be able to use two-way data binding for form inputs you need to import theFormsModule package in your Angular module. For more info see the Angular 2 official tutorial here and the official documentation for forms

提交回复
热议问题