I've been trying to find a solution to getting an HTML element to print in my MEAN app. I've checked ng-print, angular-print, angular-save-html-to-pdf and more, but these all seem to have been developed for Angularjs. Does anyone have a solution for printing in the newest version of angular?
or failing that, how can I use something like angular-print with angular 2 and above?
for clarification: i'd ideally import the module/directive into app.module.ts, then mark the elements and button i'd like to use with printing in my html file. I also assume i may need to add something to the component linking to the html file. The html would look like:
<button print-directive>Print</button>
<div print-id="printThisElement">
<p>content</p>
</div>
or
<button (click)="printfunction();">Print</button>
<div print-id="printThisElement">
<p>content</p>
</div>