Open d4e666 opened 7 years ago
+1
I use following code it can call the function when I click Ok or Cancel button
.open()
.then((dialog: DialogRef<TwoButtonPreset>) => {
dialog.result.then(result => {
function here
}).catch(() => {
function here
})
}
);
@qwe852147 is right, this information has should be explicit on documentation. :/
You guys are correct. Thank you guys are good ones to help the documents!
IMPORTANT: Please provide a sample using:
I provided the functions in the following ways, but neither work
this.modal.confirm() .size('sm') .isBlocking(true) .showClose(true) .keyboard(27) .title('Are you sure?') .body('Are you sure you want to delete "User" from that file?') .open().then(function () { this.showSuccess }, function () { this.showWarning });
METHOD 2: this.modal.confirm() .size('sm') .isBlocking(true) .showClose(true) .keyboard(27) .title('Are you sure?') .body('Are you sure you want to delete "User" from that file?') .open().then(this.showSuccess, this.showWarning);
What is the expected behavior? to be able to handle callback from the confirm or any other modal dialog (e.g. can I delete something or request additional input before proceeding). I guess I'm just missing an example here?
Please tell us about your environment:
Angular version: 4.1.2
Browser: [all]