如何在md对话框中指定2个确定按钮?

时间:2018-09-06 13:15:29

标签: angularjs mddialog

我想要2个带有自定义处理程序的确定按钮和1个取消按钮。如果我尝试添加到md dialog

.ok("OK#1").ok("OK#2").cancel("Cancel")

仅显示第二个OK。我该如何调整?

示例代码:

               $scope.showConfirm = function(event) {
               var confirm = $mdDialog.confirm()
                  .title('Are you sure to delete the record?')
                  .textContent('Record will be deleted permanently.')
                  .ariaLabel('TutorialsPoint.com')
                  .targetEvent(event)
                  .ok('OK#1')
                  .ok('OK#2')
                  .cancel('Cancel');
               $mdDialog.show(confirm).then(function() {
                  $scope.status = 'Record deleted successfully!';
               }, function() {
                  $scope.status = 'You decided to keep your record.';
               });
            };

0 个答案:

没有答案