preview image in angular 8
<form [formGroup]="uploadForm" (ngSubmit)="submit()">
<!-- Select File -->
<input type="file" accept="image/*" (change)="showPreview($event)" />
<!-- Image Preview -->
<div class="imagePreview" *ngIf="imageURL && imageURL !== ''">
<img [src]="imageURL" [alt]="uploadForm.value.name">
</div>
<!-- Assign Image Alt -->
<input formControlName="name" placeholder="Enter name">
<button type="submit">Submit</button>
</form>