码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2017-07-19 23:28:58      阅读:459      评论:0      收藏:0      [点我收藏+]

标签:xxx   logs   inpu   解决   分享   log   bin   报错   mode   

用[(ngModel)]="xxx"双向绑定,如:技术分享控制台报错:Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘input‘.

 

解决办法:在app.module.ts文件中导入FormsModule

 

技术分享

 

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

标签:xxx   logs   inpu   解决   分享   log   bin   报错   mode   

原文地址:http://www.cnblogs.com/jzsz/p/7208511.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!