Print contents of a div in Prime NG

0

I have the following code to print a part of a screen:

const printQR = document.getElementById (divName) .innerHTML; const content = document.body.innerHTML; document.body.innerHTML = printQR; window.print (); document.body.innerHTML = content;

works fine since when printing it takes the Prime NG styles of the template I use, but once I click on the button, I print the page and close it, it does not allow me to click on other buttons and it freezes at times the screen.

On the other hand, if I try to print the content by creating a blank page in a browser tab, it does not take the styles of the template.

    
asked by Natali Gamboa 14.10.2018 в 02:47
source

0 answers