ts
@ViewChild('iframe') iframe: ElementRef;
this.applicationService.pay(this.card).subscribe((data: any) => {
this.setIframe(this.iframe);
}
private setIframe(iframe: ElementRef): void {
const win: Window = iframe.nativeElement.contentWindow;
const doc: Document = win.document;
doc.open();
doc.write(this.modalContent);
doc.close()
}
<iframe #iframe frameborder="1"></iframe>
https://stackblitz.com/edit/angular-jc3qew