Hi,
I am new to ionic and facing one weird issue. I am trying to display alter popup with radio button input type. Everything working as expected but for in one scenario i need to call API and get the response and then add those responses on the alter popup as radio buttons. There i am getting response values properly and popup opens and radio buttons are also displaying as expected but didnt see any label for that. Not sure why labels or value are not showing for that radio button. Here is my code and issue screen shot.
Ionic version details:
Error:
Code :
if(options[i].indexOf('-')>0){ //THIS BELOW CONDITION IS NOT WORKING.
var arrayString=options[i];
console.log("arrayString:"+arrayString)
var country = this.restProvider.details.COUNTRY;
this.restProvider.getResponseOptionsTranslations(arrayString,country).then(res => {
let transResponses: any =[];
transResponses = res['value'] as string[];
for(var i=0;i<transResponses.length;i++){
if(transResponses[i]["TRANSLATION_VALUE"]!= undefined){
var transRes=transResponses[i]["TRANSLATION_VALUE"];
alert.addInput({
type: 'radio',
label:transRes,
value:transRes,
});
console.log("transRes2:"+transRes)
}
}
});
Any inputs are highly appreciated.