Angular: Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’
来源:互联网 发布:淘宝店的货源哪里来 编辑:程序博客网 时间:2024/06/05 15:13
当使用
[(ngModel)]
做双向绑定时,如果遇见Angular: Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’问题
解决办法:
在你的app.module中添加如下代码即可:
import { FormsModule, ReactiveFormsModule } from ‘@angular/forms’;
@NgModule({
imports: [
FormsModule //此代码仅为需加入的部分,注意比对你本身的代码,把这个加入其中即可
]
阅读全文
0 0
- Angular: 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’
- angular--Can't bind to 'ngModel' since it isn't a known property of 'input'
- 【angular】ngModel遇见的坑:Can't bind to 'ngModel' since it isn't a known property of 'input'
- Angular4.X 报错: Can't bind to 'ngModel' since it isn't a known property of 'input'
- 错误 Angular2 Can't bind to 'routerLink' since it isn't a known property of 'a'
- Can't bind to 'formGroup' since it isn't a known property of 'form'. ("
- Template parse errors: Can't bind to 'placeholder' since it isn't a known property of 'select'
- storage size of 'a' isn't known
- storage size of ‘oldact’ isn’t known
- storage size of ‘XXX’ isn’t known
- storage size of `seraddr' isn't known #include
- error: storage size of 'rq' isn't known 正解
- error storage size of 'pwbuf' isn't known
- error: storage size of ‘server_addr’ isn’t known
- error: storage size of ‘md_ctx’ isn’t known
- error: Apostrophe not preceded by \ (in haven't input accoount or it isn't a legal E-mail)
- It isn't possible to write into a document from an asynchronously-loaded
- 《人性的弱点》第二章 获取喜爱的十二大技巧:读后感
- 任务分解
- android app跳转到微信
- Jackson 时间格式化输入输出
- 人脸识别之端到端框架(六)--SphereFace
- Angular: Can’t bind to ‘ngModel’ since it isn’t a known property of ‘input’
- opencv分水岭分割算法C++是
- 功耗问题研究
- 记忆碎片
- MVP实现二级购物车
- windows查看端口使用进程
- 经典算法之直接选择排序
- JSP语法之脚本、指令、注释的综合例子
- Java并发编程:线程池的使用