//引入模块

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

 

imports:[

FormsModule

]

 

<div>
<label>name:
<input type="text" [(ngModel)]="hero.name">
</label>
</div>

相关文章:

  • 2022-12-23
  • 2021-10-26
  • 2021-12-24
  • 2021-06-20
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-21
  • 2021-12-03
相关资源
相似解决方案