<head>
<script>
function printContent(el){
var restorepage = document.body.innerHTML;
var printcontent = document.getElementById(el).innerHTML;
document.body.innerHTML = printcontent;
window.print();
document.body.innerHTML = restorepage;
}
</script>
`
How I can use this script in my component class method.I want when My button is clicked my above script is run but I don't know how manipulation DOM in Angular 2