I am trying to check my radio button with zero value by default. I am trying to use the [checked]='true'
attribute. But that does not work.
<input type="radio" name="unitTrusts-pnl" id="unitTrusts-pnl0" class="with-gap" [value]="0" [(ngModel)]="unitTrustsPnl" [checked]='true'>
<input type="radio" name="unitTrusts-pnl" id="unitTrusts-pnl0" class="with-gap" [value]="1" [(ngModel)]="unitTrustsPnl">
DEMO
https://stackblitz.com/edit/angular-jj9gib
Try adding this in addition to the [checked] you already have:
[attr.checked]="true"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With