Reputation:
I'd like to have 2 ok buttons with custom handlers and 1 cancel button. If I try to add to md dialog?
.ok("OK#1").ok("OK#2").cancel("Cancel")
only the 2nd OK shows up. How can I tune it it?
Sample code:
$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.';
});
};
Upvotes: 0
Views: 143