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

26 lines
689 B
TypeScript

import { Component, OnInit } from '@angular/core';
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng';
import { Answer } from '../../../core/enums/answer.enum';
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;
public answerEnum = Answer;
constructor(public ref: DynamicDialogRef, public config: DynamicDialogConfig) {}
ngOnInit(): void {
this.choice = this.config.data;
}
public closeDialog(): void {
this.ref.close();
}
}