Quation anwer
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user