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

 angular项目启动报错

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

原因:当前module模块未引入 'ngModel',  把 FormsModule 添加到 @NgModule 元数据的 imports 数组中即可

posted @ 2020-01-14 11:31  冰凝^  阅读(2711)  评论(0编辑  收藏  举报