Closed dealeo closed 6 years ago
Ok for first question, I found the solution using (itemSelected).
can you please post me the code for itemSelected event? I am unable to figure out.
Hello,
Here is my html code : `<div id="writeAnswer" *ngIf="showWriteMode && !showComment"> <ion-searchbar (ionInput)="getItems($event)" placeholder="Indiquez votre réponse ..." autofocus [ngClass]="{ wrong: answerFalse == true, correct: answerTrue == true }">
Here is my ts code :
checkAnswer(answer){ this.userAnswer = answer; this.showViews(MODE_WRITE_RESULT); }
`case MODE_WRITE_RESULT :
if(this.userAnswer.toUpperCase() == this.question.correctAnswer.toUpperCase()){
this.showWriteMode = true;
this.showTryAgainButton = false;
this.showChangeGameButtons = false;
this.showButtonComment = true;
this.answerTrue = true;
this.showCommentPageWithDelay()
} else {
this.showWriteMode = true;
this.showTryAgainButton = true;
this.showChangeGameButtons = true;
this.showButtonComment = false;
this.OtherGame1 = "Une-Deux";
this.OtherGame2 = "Big Four";
this.answerFalse = true;
}
break;`
Hello,
I was able to use getSelection() and getValue() on click event but what I would like to do is get the selected element when I click on the list and not on the input area. Can you please help me to do that?
Another thing, I tried several things but I'm not able to use the method setFocus() on the component. Can you please assist me?
With best resgards,
Jerome