import {Component,OnInit,Input,Output,EventEmitter} from '@angular/core'; import { CmMessageService } from './../../../../../../../src/components/cosmos.module'; import { UploadFile } from './../../../../../../components/base/upload/interface'; @Component({ selector: 'cm-upload-doc-7', templateUrl: './upload-doc-7.component.html', styleUrls: ['./upload-doc-7.component.css'] }) export class UploadDoc7Component implements OnInit{ ngOnInit() {} ngOnDestroy() {} constructor(private msg: CmMessageService) {} handleChange(obj:any) { const status = obj.file.status; if (status !== 'uploading') { console.log(obj.file, obj.fileList); } if (status === 'done') { this.msg.success(`${obj.file.name} file uploaded successfully.`); } else if (status === 'error') { this.msg.error(`${obj.file.name} file upload failed.`); } } }