import { Component, OnInit } from '@angular/core';
import { AngularCreatePdfService } from 'angular-create-pdf';
@Component({
selector: 'app-pdf-demo',
template: `
<div #pdfContainer>
<p>A cookie associated with a cross-site resource at was set without the `SameSite` attribute. A future release of Chrome will only deliver cookies with cross-site requests if they are set with `SameSite=None` and `Secure`. You can review cookies in developer tools under Application>Storage>Cookies and see more details at and .</p>
</div>
<button (click)="createPdfTem(pdfContainer)">生成PDF</button>
`
})
export class AppPadDemoComponent {
constructor(
private pdfService: AngularCreatePdfService,
) { }
ngOnInit() {
}
public createPdfTem(ele: any) {
this.pdfService.createPdf(ele, '我的PDF');
}
}