Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49235

Flash Card Component

$
0
0

@Nicolas195 wrote:

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

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 49235

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>