Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

mcq.component.ts 470 B

4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
4 år sedan
12345678910111213141516171819202122
  1. import { Component, OnInit, Input } from '@angular/core';
  2. @Component({
  3. selector: 'app-mcq',
  4. templateUrl: './mcq.component.html',
  5. styleUrls: ['./mcq.component.scss'],
  6. })
  7. export class McqComponent implements OnInit {
  8. @Input() text: string = '';
  9. @Input() choices: Array<{
  10. value: string,
  11. text: string,
  12. }>;
  13. @Input() correctAnswer: string;
  14. selectedChoice: string = '';
  15. constructor() { }
  16. ngOnInit() {}
  17. }