funky-framadate-front/src/app/shared/components/choice-details/choice-details.component.ts

28 lines
799 B
TypeScript
Raw Normal View History

import { Component, Inject, OnInit } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
2020-05-12 19:16:23 +02:00
2020-06-12 19:17:39 +02:00
import { Answer } from '../../../core/enums/answer.enum';
2020-05-12 19:16:23 +02:00
import { Choice } from '../../../core/models/choice.model';
2021-04-27 12:38:12 +02:00
import { Poll } from '../../../core/models/poll.model';
2020-05-12 19:16:23 +02:00
@Component({
selector: 'app-choice-details',
templateUrl: './choice-details.component.html',
styleUrls: ['./choice-details.component.scss'],
})
export class ChoiceDetailsComponent implements OnInit {
2020-06-12 19:17:39 +02:00
public answerEnum = Answer;
2020-05-12 19:16:23 +02:00
constructor(
public dialogRef: MatDialogRef<ChoiceDetailsComponent>,
2021-04-27 12:38:12 +02:00
@Inject(MAT_DIALOG_DATA) public choice: Choice,
@Inject(MAT_DIALOG_DATA) public poll: Poll
) {}
2020-05-12 19:16:23 +02:00
ngOnInit(): void {}
2020-05-12 19:16:23 +02:00
public closeDialog(): void {
this.dialogRef.close();
2020-05-12 19:16:23 +02:00
}
}