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

26 lines
689 B
TypeScript
Raw Normal View History

2020-05-12 19:16:23 +02:00
import { Component, OnInit } from '@angular/core';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng';
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';
@Component({
selector: 'app-choice-details',
templateUrl: './choice-details.component.html',
styleUrls: ['./choice-details.component.scss'],
})
export class ChoiceDetailsComponent implements OnInit {
public choice: Choice;
2020-06-12 19:17:39 +02:00
public answerEnum = Answer;
2020-05-12 19:16:23 +02:00
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig) {}
ngOnInit(): void {
this.choice = this.config.data;
}
public closeDialog(): void {
this.ref.close();
}
}