nx-primeng-sakai-v17/src/app/components/file/file.component.ts
2021-12-28 13:29:25 +03:00

22 lines
522 B
TypeScript
Executable File

import {Component} from '@angular/core';
import {MessageService} from 'primeng/api';
@Component({
templateUrl: './file.component.html',
providers: [MessageService]
})
export class FileComponent {
uploadedFiles: any[] = [];
constructor(private messageService: MessageService) {}
onUpload(event) {
for (const file of event.files) {
this.uploadedFiles.push(file);
}
this.messageService.add({severity: 'info', summary: 'Success', detail: 'File Uploaded'});
}
}