我想在单击angular7的pdialouge中的X Cancel时得到事件

时间:2019-05-28 01:59:23

标签: angular

我想在单击angular对话框上的X取消后执行一些操作:

<p-dialog header={{header}}  [(visible)]="display" [modal]="true" 
          [responsive]="true" [style]="{width: '400px', minWidth: '250px'}"
          [minY]="70"
          [maximizable]="true" [baseZIndex]="10000"
          (onShow)="onshow.emit($event)"
          (onHide)="onhide.emit($event)" >
    <ng-container  *ngTemplateOutlet="modalBodyTemplate" >
    </ng-container>
    <p-footer>
       <button *ngIf="isOkButton" type="button" pButton icon="pi pi-check" 
               (click)="onsave.emit($event)" label={{buttonOk}}>
       </button>
       <button *ngIf="isCancelButton" type="button" pButton icon="pi pi-close" 
               (click)="oncancel.emit($event)" label={{buttonCancel}}
               class="ui-button-secondary">
       </button>
    </p-footer>
</p-dialog>

0 个答案:

没有答案