最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
解决angular2在双向数据绑定时[(ngModel)]无法使用的问题
时间:2022-06-25 15:39:14 编辑:袖梨 来源:一聚教程网
angular2在双向数据绑定时[(ngModel)]无法使用,出现的错误是:
Can't bind to 'ngModel' since it isn't a known property of 'input'.
解决办法:
在文件 app.component.ts 中引入ngModel
具体为:
添加两行代码:
import { FormsModule } from '@angular/forms';
和
FormsModule,
位置如下:
相关文章
- 三国志8重制版结为配偶作用介绍说明 11-01
- 三国志8重制版结为金兰作用介绍说明 11-01
- 三国志8重制版助阵触发条件及方法分享 11-01
- 三国志8重制版娶湘姬条件及作用说明 11-01
- 三国志8重制版娶莲姬条件及作用说明 11-01
- 荒野大镖客救赎亡灵宝藏猎人成就攻略 11-01
