ngx-print icon indicating copy to clipboard operation
ngx-print copied to clipboard

Angular 9 - Not printing modal window

Open JustAnotherDev22 opened this issue 4 years ago • 2 comments

Describe the bug I have a modal window that I would like to print. I've added the code as per the documentation. However, when I click on the button nothing happens.

To Reproduce Steps to reproduce the behavior.

Here is the relevant code in my application:

parent html:

<app-smtbtms-case-management-edit #editCaseDetailModal (updateSuccess)="updateCaseDetailsResponse($event)"> </app-smtbtms-case-management-edit>

parent ts:

@ViewChild('editCaseDetailModal') editCaseManagementComponent: CaseManagementEditComponent;

child html:

`

`

app module:

Added to the import section.

Expected behavior modal window should print.

Screenshots

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • Version 84.0.4147.135 (Official Build) (64-bit)

Additional context Let me know if you need additional info. Thx

JustAnotherDev22 avatar Aug 25 '20 17:08 JustAnotherDev22

Accidentally deleted from child html section:

<button printSectionId="editCaseDetailModal" ngxPrint>Print</button>

JustAnotherDev22 avatar Aug 25 '20 17:08 JustAnotherDev22

Are you still having this issue? I would check your console logs and make sure the section id is being found by the child component.

Core121 avatar Dec 04 '23 02:12 Core121