I used the tutorial of “Josh Morony” to create a quiz about Ionic. In his home.ts he uses the setTimeout (), but I would like to replace it with a button, it’s been several hours that I try different combination without ever finding the solution. If anyone could help me, it would be great.
selectAnswer(answer, question){
this.hasAnswered = true;
answer.selected = true;
question.flashCardFlipped = true;
if(answer.correct){
this.score++;
}
setTimeout(() => {
this.hasAnswered = false;
this.nextSlide();
answer.selected = false;
question.flashCardFlipped = false;
}, 3000)
}
I am available if you have questions, Thank You