Angular: Can't bind to 'ngModel' since it isn't a known property of 'input'问题解决
来源:互联网 发布:女用避孕套 知乎 编辑:程序博客网 时间:2024/06/01 10:42
当最初使用
[(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
- Session的简单介绍
- HDU 1247 Hat’s Words(字典树)
- qt 完全实现qq翻转登录界面
- Java学习总结IIII
- WeaveSocket框架-Unity太空大战游戏-通信协议-2
- Angular: Can't bind to 'ngModel' since it isn't a known property of 'input'问题解决
- iOS开发之UI篇(3)—— UILabel
- linux下shell显示-bash-4.1#不显示路径解决方法
- 打印两个有序链表的公共部分 Python 版
- 高斯曲率求表面极值点
- 【Weblogic】Weblogic Server环境下JNDI命名服务
- SQL——数据库实验一
- 基础巩固--堆栈轨迹
- ubuntu mysql多实例配置