skip to Main Content

Html – Page not clickable while printing in angular

component: <div class="container" id="component1"> Content </div> <div class="container" id="component2"> other content </div> <button (click)="print('component1')">Print</button> .ts file: print(cmpName) { let printContents = document.getElementById(cmpName).innerHTML; let originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } after print the content of page…

VIEW QUESTION
Back To Top
Search