在input中使用[ngModel]报错:error NG8002:  Can't bind to 'ngModel' since it isn't a known property of 'input'

angular学习笔记_ide

 

 

解决办法:在module.ts中添加​​import​​和​​providers​

import { FormsModule } from '@angular/forms';

angular学习笔记_ide_02