Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘xxx‘

Posted muzizongheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘xxx‘相关的知识,希望对你有一定的参考价值。

当在angular中使用双向绑定时, 需要导入angular的FormsModule。

 

import FormsModule from '@angular/forms';

 

 

另外,记着 imports:  [ FormsModule]

以上是关于Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘xxx‘的主要内容,如果未能解决你的问题,请参考以下文章

Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘xxx‘

Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘xxx‘

Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘xxx‘

Template parse errors: Can't bind to 'ngModel' since it isn't a known property of &#

Can't bind to local 8700 for debugger报错和解决

解决“Can't bind to local 8630 for debugger”错误--查杀多余进程