angular-dialog-service icon indicating copy to clipboard operation
angular-dialog-service copied to clipboard

How to add buttons to error dialog?

Open smartm0use opened this issue 9 years ago • 0 comments
trafficstars

Hello, i created the following method:

    function throwErrorDialogFn(message) {
      var dialogTitle = 'Error';
      var dialogMsg = '';

      if (message === 'no-data') {
        dialogMsg = 'No documents';
      } else if (message === 'error') {
        dialogMsg = 'Loading error';
      }
      var dialogOptions = {
        animation: true,
        backdrop: 'static',
        keyboard: false,
        size: 'sm'
      };

      var dialog = dialogs.error(dialogTitle, dialogMsg, dialogOptions);
      dialog.result.then(function(btn) {
        console.log('button1');
      }, function(btn) {
        console.log('button2');
      });
    }

But it displays only the first button. How to enable button 2 or how to add more buttons?

smartm0use avatar Mar 29 '16 12:03 smartm0use