Html string receiving from java:
In Angular function using below code to open new window with above string.
const win = window.open('', '_blank', 'left=50,top=50,width=1334,height=700'); win.document.write(htmlData);
Is there any better way to handle this scenario in Angular 8.
document.write(), you have to call
document.close() afterwards to finalize the document, otherwise the
load event will not be fired.
const win = window.open('', '_blank', 'left=50,top=50,width=1334,height=700'); win.document.write(htmlData); win.document.close();
Answered By – aweebit
This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0