I am new to ionic 2 and I could not find a proper solution for this.I have two radio buttons in my signup form. I need to enable two in put fields based on the radio button that is clicked. If radio button one is clicked input field one should be enabled.
Radio buttons
<div radio-group formGroupName="church">
<label>Church</label>
<div>
<label>CGT</label>
<ion-radio value="cgt" ></ion-radio>
<label>Other church</label>
<ion-radio value="noncgt"></ion-radio>
</div>
</div>
<div>
Input fields
<div>
<label>CGT member ID </label>
<input formControlName="cgtMemberID" type="text" disabled="true">
<small [hidden]="myForm.controls.cgtMemberID.valid || (myForm.controls.cgtMemberID.pristine && !submitted)">
member ID required .
</small>
</div>
<div>
<label>Church Name </label>
<input formControlName="churchName" type="text" disabled="true">
<small [hidden]="myForm.controls.churchName.valid || (myForm.controls.churchName.pristine && !submitted)">
Church name required .
</small>
</div>