Files
psp_panel/src/app/components/file/file.component.ts
T

22 lines
522 B
TypeScript
Raw Normal View History

2021-12-09 17:24:42 +03:00
import {Component} from '@angular/core';
import {MessageService} from 'primeng/api';
@Component({
2021-12-28 13:29:25 +03:00
templateUrl: './file.component.html',
2021-12-09 17:24:42 +03:00
providers: [MessageService]
})
2021-12-28 13:29:25 +03:00
export class FileComponent {
2021-12-09 17:24:42 +03:00
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'});
}
}