How can I get the Radio Group Value, using the getelementbyid function?

In html file… I Declare dir_1_2, with two ion-radio buttons.


<ion-radio-group id="dir_1_2" [(ngModel)]="dir_1_2">

<ion-item><ion-label>De: (Origen)</ion-label><ion-radio slot="start" value="1"></ion-radio></ion-item>    
<ion-label class="ion-1x">({{Lat1+','+Lng1}})</ion-label><ion-input minlength="1" disabled  type="text"  [(ngModel)]="desde" id="desde"></ion-input>

<ion-item><ion-label>A: (Destino)</ion-label><ion-radio slot="start" value="2"></ion-radio></ion-item>
<ion-label class="ion-1x">({{Lat2+','+Lng2}})</ion-label><ion-input   minlength="1" disabled  type="text" [(ngModel)]="donde" id="donde"></ion-input>

In the .ts file, I’m getting the IonGroup value with this sentence…

if (window.document.getElementById(‘dir_1_2’).getAttribute(‘ng-reflect-model’)==“2”)

This Works fine in Debug build, but in release, this don’t work. How can I get the value correctly?

Thanks in advance.