我最近将angular版本升级为6-rc.我得到了以下警告
看起来您在与相同的表单字段上使用了ngModel
有关这方面的更多信息,请参阅此处的API文档: https://angular.io/api/forms/FormControlName#use-with-ngmodel个
它到底说了什么?该链接没有任何#use-with-ngmodel
的片段
我想我需要删除ngModel
并使用formGroup作为我的数据绑定对象.
我最近将angular版本升级为6-rc.我得到了以下警告
看起来您在与相同的表单字段上使用了ngModel
有关这方面的更多信息,请参阅此处的API文档: https://angular.io/api/forms/FormControlName#use-with-ngmodel个
它到底说了什么?该链接没有任何#use-with-ngmodel
的片段
我想我需要删除ngModel
并使用formGroup作为我的数据绑定对象.
如果您现在正在查找ANGLE 6文档,那么使用https://next.angular.io
https://next.angular.io/api/forms/FormControlName#use-with-ngmodel
所以你有3个 Select :
使用react 形式
使用模板驱动表单
静音警告(不推荐)
imports: [
ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'});
]