In our web app I use Angular-Materials $mdDialog with the confirm-object. Is it possible to change the order of the buttons from cancel-ok to ok-cancel? And to set the initial focus to the cancel button? Maybe via CSS or a template?
The code looks like that:
var confirm = this.$mdDialog.confirm()
.parent(angular.element(document.body))
.title('Löschen')
.content('Möchten Sie wirklich löschen?')
.ariaLabel('Löschen')
.ok('Ja')
.cancel('Nein')
.targetEvent(event);
this.$mdDialog.show(confirm)
.then(() => {
// do something
});
This might work:
md-dialog md-dialog-actions {
display: block;
}
md-dialog md-dialog-actions button {
float: right;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With