JustDoItTomorrow
3/12/2018 - 9:42 AM

响应式表单:和radio按钮绑定

<!--因为radio按钮是多个,所以每个都要写formControlName,还要写value值-->
<!--我估计绑定option也是差不多的-->
<div>
  <h4>Super power</h4>
  <input type="radio" value="flight" formControlName="power">Flight
  <input type="radio" value="x-ray vision" formControlName="power">X-ray vision
  <input type="radio" value="strength" formControlName="power">Strength
</div>