Already SO has the similar question, I tried with those solution but not working.
Actual the problem is onHide event is not triggering because of the *ngIf
, If I removed the *ngIf
onHide is triggering.
<p-dialog [(header)]="dialogText" *ngIf="displayDlg" [(visible)]="displayDlg"
[modal]="true" [responsive]="true" (onHide)="close()">
But the problem is I am having the form inside the <p-dialog
If I am not using the *ngIf
I am getting the undefined error when loading the page. How can I fix this issue.?