I am trying to fetch some radio inputs and one of them has to be preselected.
Following is the code:
<div class='form-group que-box' *ngFor="let option of options">
<input type='radio' id="{{option.optionId}}" name="radio" [(ngModel)]="optionSelected" value='{{option.optionId}}'>
<label for='{{option.optionId}}'><span class="que">{{option.text}}</span></label>
</div>
But the button doesn't get preselected.I tried conditionally putting checked attribute there but that also doesn't help.The Html is rendered with the checked attribute but still the option doesn't get preselected.I have also checked that optionSelected always contain desirable value.