You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 rivejä
570 B

  1. <section class="question">
  2. <h3> {{ text }} </h3>
  3. <div class="options" [ngClass]="{'inactive' : selectedChoice }">
  4. <button *ngFor="let choice of choices"
  5. (click)="selectedChoice = choice.value"
  6. [ngClass]="{'correct': selectedChoice === choice.value && selectedChoice === correctAnswer, 'wrong': selectedChoice === choice.value && selectedChoice !== correctAnswer }">
  7. {{ choice.text }}
  8. <ion-checkbox mode="ios" [checked]="selectedChoice === choice.value"></ion-checkbox>
  9. </button>
  10. </div>
  11. </section>