In javascript I could do:
window.print()
To bring up a printer dialog box, but how do you do this in typescript?
(window as any).print();
use above line if not using typescript 2.8.2.
I did just like that
print() {
// do other stuff...
window.print();
}
In the Template file, you can just use the standard JS EventHandler onclick with window.print() for this, like so:
<button mat-raised-button color="accent" onclick="window.print()">
<span class="material-icons">print</span> Print
</button>