angular2在双向数据绑定时[(ngModel)]无法使用,出现的错误是:Can't bind to 'ngModel' since it isn't a known property of 'input'.解决办法:在文件 app.module.ts 中引入ngModel具体为:添加两行代码:import { FormsModule } from '@angular/forms';和FormsModule,位置如下: