dimanche 5 avril 2020

I have Wriiten a code in angular 9 for a radio button to work differently on event fire but a radio button need 2 clicks to get checked

In .html file

Note: list consist of increment number like 1,2,3,4,5,6,7,8,9,.....

In .TS file setRadioOption(event: any) {

 for(let i=0;i<this.singleChoiceOptionsList.length;i++)
 {
      this.ChoiceOptionsList[i].isCorrect=false;
      if((i+1)==event.target.id)
      {
        this.ChoiceOptionsList[i].isCorrect=true;
      }

 }

}



Aucun commentaire:

Enregistrer un commentaire