title: Bind form control to radio group and text area in angular 4 and above
body: <p>Technologies and versions:
  angular:4.4
  material: beta12
  reactive form</p>
  
  <p>I have a scenario where user can choose one option and upon selecting one of the options, user has to enter text in textarea (disabled until selecting that option).
  <a href="https://i.stack.imgur.com/WVHhq.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WVHhq.jpg" alt="enter image description here"></a></p>
  
  <p>On selecting none text area should be disabled and and on yes text area should be enabled.
  I am using reactive form where code goes like this </p>
  
  <pre><code>&lt;div fxLayout="row" fxLayoutAlign="start"&gt;
  &lt;mat-hint align="start" fxFlex="1 1 30%" fxFlex.xs="1 1 100%"&gt;
    &lt;strong&gt;Functional hardware dependencies:&lt;/strong&gt;
  &lt;/mat-hint&gt;
  &lt;mat-radio-group fxFlex="1 1 15%" fxFlex.xs="1 1 100%" fxLayout="column" fxLayoutGap="0.5rem" [formControl]="CRFormGroupData.controls.functionalHWDependencies"&gt;
    &lt;mat-radio-button color="primary" value="none"&gt;None&lt;/mat-radio-button&gt;
    &lt;mat-radio-button color="primary" value="yes"&gt;Yes, namely&lt;/mat-radio-button&gt;
  &lt;/mat-radio-group&gt;
  &lt;div fxFlex="1 1 55%" fxFlex.xs="100%"&gt;
    &lt;div fxLayout="column" fxFlex="1 1 100%"&gt;
      &lt;div fxFlex="1 1 auto"&gt;&lt;/div&gt;
      &lt;mat-form-field fxFlex="1 1 75%" floatPlaceholder="never" fxFlex.xs="100%"&gt;
        &lt;textarea matInput [formControl]="CRFormGroupData.controls.functionalHWDependencies" placeholder="Please define the dependencies"&gt;&lt;/textarea&gt;
      &lt;/mat-form-field&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>
  In my controller</p>
  
  <pre><code>CRFormGroupData=this.fb.group({functionalHWDependencies: [''],
    functionalSWDependencies: ['']});
  </code></pre>
  
  <p>OUTPUT:
  value should be "none"-> when option selected is none
  value should be whatever typed in textarea -->when user selected other option)</p>
  
  <p>There might be a chance to have 3 to 4 options with more text area as well.
  So i am trying to figure out best approach</p>