title: How to call angular function when click p-dialog close(X) button?
body: <p><strong>How to call angular function when click p-dialog close(X) button?</strong></p>
  
  <blockquote>
    <p>I have searched and just tried this <code>(onHide)="cancel()"</code> . But it's not working. Kindly share your solutions.</p>
  </blockquote>
  
  <p><em>I know we can use a <code>close/cancel</code> button to  hide the popup. But in my scenario I want to call an event when clicking the (X) button click.</em> </p>