ng: Can't bind to 'ngModel' since it isn't a known property of 'input'. - Angular 6
【出现的问题】ng: Can't bind to 'ngModel' since it isn't a known property of 'input'.
【解决方法】导入 FormsModule 到 app.module.ts (如下代码粉色标记)
import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core';import { AppComponent } from './app.component'; import { OrderComponent } from './order/order.component'; import {FormControl, FormsModule} from '@angular/forms';@NgModule({declarations: [AppComponent,OrderComponent],imports: [BrowserModule,FormsModule],providers: [],bootstrap: [AppComponent] }) export class AppModule { }
【参考】
https://stackoverflow.com/questions/38880150/angular-2-cant-bind-to-ngmodel-since-it-isnt-a-known-property-of-input
转载于:https://www.cnblogs.com/coco1989/p/9377369.html
ng: Can't bind to 'ngModel' since it isn't a known property of 'input'. - Angular 6相关推荐
- 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 'in ...
- 【Angular 4】Can't bind to 'ngModel' since it isn't a known property of 'input'
问题描述 在双向数据绑定时[(ngModel)]无法使用,出现的错误是: Can't bind to 'ngModel' since it isn't a known property of 'inp ...
- 解决Angular里面报错:error NG8002: Can‘t bind to ‘ngModel‘ since it isn‘t a known property of ‘input‘.
以上是报错内容([(ngModel)]双向绑定失效) 解决办法:在module.ts中添加 import { FormsModule } from '@angular/forms';imports: ...
- Can't bind to 'ngModel' since it isn't a known property of 'pl-select'.
当新建模块,引用一个组件时,报错Can't bind to 'ngModel' since it isn't a known property of 'plx-select'. 解决: 查询官网文档可 ...
- Can‘t bind to formControl since it isn‘t a known property of input错误消息的处理
试图给input标签页施加formControl这个Directive的时候,出现如下错误: Can't bind to 'formControl' since it isn't a known pr ...
- Cant bind to ngModel since it isnt a known property of input.ngtsc(-998002) app.component.ts(8, 7):
angular2在双向数据绑定时[(ngModel)]无法使用,出现的错误是: Cant bind to ngModel since it isnt a known property of input ...
- Can‘t bind to ‘ngForOf‘ since it isn‘t a known property of ‘xxx‘
今天遇到一个问题 提示Can't bind to 'ngForOf' since it isn't a known property of 'div' 检查了一下module配置发现是缺少了Commo ...
- Angular报错error NG8002: Can‘t bind to ‘XXX‘ since it isn‘t a known property of ‘XXX-XX‘
一.报错: error NG8002: Can't bind to 'isTemplate' since it isn't a known property of 'create-home'. 1. ...
- 项目中引用NG-ZORRO,在使用nz-form时报错Can't bind to 'formGroup' since it isn't a known property of 'form'的解决方案
项目中引用NG-ZORRO,在使用nz-form时报错 Can't bind to 'formGroup' since it isn't a known property of 'form' comp ...
最新文章
- 【工具使用系列】关于 MATLAB 机器视觉,你需要知道的事
- Android sdk manager更新下载缓慢的解决方法
- jtag和swd的区别
- qt 编译mysql wince_Qt4.8.6开发WinCE 5.0环境搭建
- intel的linux证书过期,数据库镜像中证书过期的解决方案
- 使用 Karma、Mocha、Chai 搭建支持 ES6 的测试环境
- POJ 2942 Knights of the Round Table ★(点双连通分量+二分图判定)
- java set的first_Java TreeSet pollFirst()方法与示例
- 微课|中学生可以这样学Python(例8.22):冒泡法排序
- android真机调试步骤
- 68.TextView设置中划线、下划线
- Kettle_设置全局变量
- 端午节海报|端午节海报设计素材图片大全
- 语音系统智能AI机器人AI源码营销机器人电销机器人智能电话机器人拨号机器人语音机器人空号识别FreeSWITCH呼叫中心中间ipbxIPBX科大识别阿里识别语音识别语音翻译
- 马化腾:这个市场不是拼钱、拼流量,而是拼团队、拼使命感和危机感
- html5体感游戏开发,使用HTML5开发Kinect体感游戏
- kvm显示器怎么切换服务器,kvm切换器一套键盘鼠标显示器的热键切换方法教程
- 【二级等保】二级等保安全物理环境要求有哪些?
- 滚轮每次滚动距离是一致的吗_「超硬核科普」鼠标的发展历史,中国人发明的鼠标滚轮...
- PLB: Congestion Signals are Simple and Effective for Network Load Balancing读后思考