Update folder structure
This commit is contained in:
21
src/app/components/file/file.component.ts
Executable file
21
src/app/components/file/file.component.ts
Executable file
@@ -0,0 +1,21 @@
|
||||
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'});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user