if you're using reactive forms then you can use the following way. consider the following example.
`<p class="mr-3"> Require Shipping:
<input type="radio" class="ml-2" value="true" name="requiresShipping"
id="requiresShipping" formControlName="requiresShipping">
Yes
<input type="radio" class="ml-2" value="false" name="requiresShipping"
id="requiresShipping" formControlName="requiresShipping">
No
</p>`
`
export class ClassName implements OnInit {
public yourForm: FormGroup
constructor(
private fromBuilder: FormBuilder
) {
this.yourForm= this.fromBuilder.group({
requiresShipping: this.fromBuilder.control('true'),
})
}
}
`
now you will get the default selected radio button.