【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 'input'.
解决方法
在文件app.module.ts
里添加两行代码。
import { FormsModule } from '@angular/forms';
FormsModule,
如图??
【Angular 4】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 'in ...
- 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 ...
- 解决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 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 ...
- 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'. 解决: 查询官网文档可 ...
- 【Angular专题】——(1)Angular,孤傲的变革者
目录 一. 漫谈Angular 二. 如果你还在使用Angularjs 三. 我计划这样学习Angular技术栈 一. 漫谈Angular Angular,来自Google的前端SPA框架,与Reac ...
- 【Angular 4】数据绑定
概念? Angular中的数据绑定指的是:同一组件中控制器文件(.ts)与视图文件(.html)之间的数据传递. 数据绑定可以将组件.控制器的属性和方法,和组件的模板连接起来,这样就大大降低了开发时代 ...
- 【Angular专题】 (3)装饰器decorator,一块语法糖
一. Decorator装饰器 修饰器是ES7加入的新特性,Angular中进行了大量使用,有很多内置的修饰器,后端的同学一般称之为"注解".修饰器的作用,实际上就是设计模式中常说 ...
- 【Angular专题】——(2)【译】Angular中的ForwardRef
原文地址:https://blog.thoughtram.io/angular/2015/09/03/forward-references-in-angular-2.html 作者:Christoph ...
最新文章
- c语言windows 编程下silder控件,VB6 常用控件 滚动条ScorllBar和Slider控件
- Docker简介以及mysql和redis的部署
- openrowset excel 科学计数_txt的数据导入excel中身份证或银行卡显示成科学计数如何解决...
- vue-cli3项目通过vue如何引入第三方js包完成登陆功能
- apt-get与dpkg常用命令
- 学习笔记:CentOS7学习之二十二: 结构化命令case和for、while循环
- 接口设计的几个注意事项
- 计算机办公软件应用二级 考试题库,计算机二级办公软件高级应用技术考试真题题库...
- oracle+rman+备份命令,Oracle Rman 备份命令超详解释
- 2020最新 程序员数学(基础+进阶)
- SQL语句学习1——SHOW命令
- mib节点 snmp trap_snmp trap编写
- 局域网vnc远程控制软件,那些超级好用的局域网vnc远程控制软件
- 读书感受 之 《乔布斯全书》
- 吉他调音软件 android,吉他调音器专业版
- ASP.Net三层架构
- 环境变量配置文件的作用-L63
- 电子原理 半波整流与桥式整流Protues仿真电路
- 操作系统镜像下载【windows+linux+mac】
- JavaSE基础知识回顾