NgPrint
Directive for printing any HTML element. For Angular 2+.
Usage
- Install
npm install ng-print
- Import into main module
;
- Add directive to template
<!--Element you want to print--> <!-- 'printThis' is template reference -->Print table
This directive create iframe
on bottom of document and copy all html head into it, so the styles in your angular app are imported into iframe.
Printed element looks pretty much the same as in your app.
Created iframe is set to display:none
.
After print or cancelation, it removes created iframe.
This library was generated with Angular CLI version 8.0.3.