Whenever I run my web application's function, the iframe is displayed. However, on Android, all I see is a white screen. Can anyone assist with resolving this issue? HMTL
html
<ion-content>
<ion-button expand="full" color="warning" (click)="showPdf()">Visualizar PDF</ion-button>
<iframe data-tap-disabled="true" [src]="sanitizer.bypassSecurityTrustResourceUrl(urlPDf)" *ngIf="viewPDF"></iframe>
</ion-content>
file.TS
import { Component, OnInit, Sanitizer } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
@Component({
selector: 'app-agendamento-perfil',
templateUrl: './agendamento-perfil.page.html',
styleUrls: ['./agendamento-perfil.page.scss'],
})
export class AgendamentoPerfilPage implements OnInit {
urlPDf:String;
viewPDF:Boolean = false;
constructor(
private sanitiser: Sanitizer,
public sanitizer: DomSanitizer
) { }
ngOnInit() {
}
showPdf(){
this.urlPDf = 'https://www.soundczech.cz/temp/lorem-ipsum.pdf';
this.viewPDF = true;
}
}