title: p-dialog onHide is not working with ngIf?
body: <p>Already SO has the similar <a href="https://stackoverflow.com/questions/44065786/p-dialog-onhide-not-working-in-angular-2-component-primeng">question</a>, I tried with those solution but not working. </p>
  
  <p>Actual the problem is onHide event is not triggering because of the <code>*ngIf</code>, If I removed the <code>*ngIf</code> onHide is triggering.  </p>
  
  <pre><code> &lt;p-dialog [(header)]="dialogText" *ngIf="displayDlg" [(visible)]="displayDlg" 
    [modal]="true" [responsive]="true" (onHide)="close()"&gt;
  </code></pre>
  
  <p>But the problem is I am having the form inside the <code>&lt;p-dialog</code> If I am not using the <code>*ngIf</code> I am getting the undefined error when loading the page. How can I fix this issue.?</p>