src/app/shared/dialogs/dialogs-images.component.html
<h3 *ngIf="images.length !== 0" mat-dialog-title i18n>Select an Image</h3>
<h3 *ngIf="images.length === 0" mat-dialog-title i18n>No Images to Select</h3>
<mat-dialog-content>
<mat-grid-list cols="3" rowHeight="1:1">
<mat-grid-tile *ngFor="let image of images" (click)="selectImage(image)">
<img [src]="urlPrefix + '/' + image._id + '/' + image.filename">
<mat-grid-tile-footer>{{image.title}}</mat-grid-tile-footer>
</mat-grid-tile>
</mat-grid-list>
</mat-dialog-content>
<mat-dialog-actions>
<button mat-raised-button mat-dialog-close i18n>Cancel</button>
<button type="button" mat-raised-button color="primary" (click)="fileInput.click()" i18n>Add New Image</button>
<input hidden (change)="uploadImage($event)" #fileInput type="file">
</mat-dialog-actions>