@wekas wrote:
I am displaying an image in a modal.
It works fine on web but on an Android device it only intermittently shows the image (otherwise it shows a no image placeholder).
If I get closing and reopening the modal / image by clicking on the thumbnail, about 25% of the time it shows the image ok.I figure its something to do with the async loading of the base64 image data I am passing in as a parameter. Any ideas to fix this?
<ion-content class="content-modal"> <div class="content-inner"> <ion-img [src]="imageDataUrl" (click)="onCloseModal()"></ion-img> </div> </ion-content>
export class ViewImageComponent implements OnInit { @Input() imageDataUrl: string; constructor(private modalCtrl: ModalController) { } ngOnInit() { } onCloseModal() { this.modalCtrl.dismiss(); } }
Posts: 1
Participants: 1