shlomiassaf / ngx-modialog

Modal / Dialog for Angular
http://shlomiassaf.github.io/ngx-modialog
MIT License
686 stars 241 forks source link

How to add a Cancel Button on the popup? #419

Closed wgsl2005 closed 6 years ago

wgsl2005 commented 6 years ago

I have used the following codes to add a Cancel button besides a OK button, but got a "Property cancelBtn does not exist on type OneButtonPreset Builder". Can anyone let me know the steps to add a cancel button? Sorry I am new to the nodejs and angular world.

const confirmDialog = this.modal.alert() .size('lg') .showClose(true) .title(this.dialogTitle) .body(this.buildConfirmMsg(temp)) .okBtn("OK") .cancelBtn("Cancel") .open();

wgsl2005 commented 6 years ago

changing alert() to confirm() worked.