Quation anwer

This commit is contained in:
CHIEFSOFT\ameye
2024-08-19 12:15:27 -04:00
parent 4c3a492b42
commit 2d6ab94556
2 changed files with 18 additions and 3 deletions
@@ -46,12 +46,15 @@
</ion-list>
</div>
<div style="width: 100%; text-align: right; margin-top: 10px; display: flex;">
<div style="width: 50%; text-align: left;">
<div style="width: 15%; text-align: left;">
<ion-button fill="clear" size="small" (click)="resetQuestion()" >
<ion-icon slot="icon-only" color="danger" name="close-circle-outline"></ion-icon>
</ion-button>
</div>
<div style="width: 50%; text-align: right;">
<div style="width: 40%; text-align: right;">
{{result_text}}
</div>
<div style="width: 45%; text-align: right;">
<ion-button
shape="round"
[disabled]="isAnsDisabled"
@@ -86,8 +86,20 @@ await loading.present();
);
}
result_text:string='';
confirmAns(){
this.isAnsDisabled = true;
this.getGenerativeQuestion();
if (this.myNextQuestion.answer == this.selected_ans){
this.result_text="Correct";
}
else
{
this.result_text="Not correct";
}
setTimeout(()=>{
this.result_text='';
this.getGenerativeQuestion();
}, 5000);
}
}