<ng-container *ngIf="fileInfo && fileInfo.FileType" [ngSwitch]="fileInfo.FileType" > <ucap-chat-message-box-attach-file *ngSwitchCase="FileType.File" [fileInfo]="fileInfo" [expired]="getExpiredFile()" (save)="onSave($event)" > </ucap-chat-message-box-attach-file> <ucap-chat-message-box-attach-file *ngSwitchCase="FileType.Sound" [fileInfo]="fileInfo" [expired]="getExpiredFile()" (save)="onSave($event)" > </ucap-chat-message-box-attach-file> <ucap-chat-message-box-image *ngSwitchCase="FileType.Image" [fileInfo]="fileInfo" [expired]="getExpiredFile()" (click)="onClickImageViewer(fileInfo)" ></ucap-chat-message-box-image> <ucap-chat-message-box-video *ngSwitchCase="FileType.Video" [fileInfo]="fileInfo" [expired]="getExpiredFile()" (click)="onClickImageViewer(fileInfo)" ></ucap-chat-message-box-video> <ucap-chat-message-box-text *ngSwitchDefault [message]="message" ></ucap-chat-message-box-text> </ng-container>