angular2 - Can't bind to'ngModel'since it isn't a known property of'input'
本文介绍了angular2 - Can't bind to'ngModel'since it isn't a known property of'input'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
使用angular form的时候想在input控件上绑定model抛错了,在线等,急用。
解决方案
查询官网文档可知 ngModel 指令存在于 npm package: @angular/forms, 参考官网样例在对应的 Module 中导入
import { FormsModule } from "@angular/forms";
这篇关于angular2 - Can't bind to'ngModel'since it isn't a known property of'input'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文