ucap-doc/documents/업무/6월/2째주/backup/document-viewer.component.ts
Park Byung Eun 7dcec1aaad sync
2020-06-09 09:12:32 +09:00

40 lines
942 B
TypeScript

import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { ucapAnimations } from '../../animations';
import { FileInfo } from '@ucap-webmessenger/protocol-file';
import { FileDownloadItem } from '@ucap-webmessenger/api';
@Component({
selector: 'ucap-document-viewer',
templateUrl: './document-viewer.component.html',
styleUrls: ['./document-viewer.component.scss'],
animations: ucapAnimations
})
export class DocumentViewerComponent implements OnInit {
@Input()
fileInfo: FileInfo;
@Input()
fileDownloadUrl: string;
@Output()
download = new EventEmitter<FileDownloadItem>();
@Output()
closed = new EventEmitter<void>();
fileDownloadItem: FileDownloadItem;
constructor() {}
ngOnInit() {}
onClickDownload(): void {
this.fileDownloadItem = new FileDownloadItem();
this.download.emit(this.fileDownloadItem);
}
onClickClose(): void {
this.closed.emit();
}
}