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

前端 未结 30 1418
予麋鹿
予麋鹿 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:03

    I know this question is about Angular 2, but I am on Angular 4 and none of these answers helped.

    In Angular 4 the syntax needs to be

    [(ngModel)]
    

    Hope this helps.

提交回复
热议问题