W bloku akcji MdDialog do md-dialogów, czy można wyrównać przycisk po lewej stronie, gdy są dwa przyciski wyrównane w prawo?Jak wyrównać przyciski w bloku MdDialog-dialog-akcje-akcje
Oto niektóre z rzeczy, które próbuję wykonać. Powiedz, na pierwszym modalu, jak oddzielić przyciski Tak i Nie? (Zobacz plik common-model.component.ts) (To plnkr ma jakieś inne problemy na to, że wciąż pracuję dalej. Ale to nie wiąże się to pytanie.)
import { Component } from '@angular/core';
import { MdDialogRef } from "@angular/material";
@Component({
selector: 'common-modal',
template: `
<h2 md-dialog-title id="modal-title">{{ title }}</h2>
<md-dialog-content>
<p class="dialog-body" id="modal-message">{{ message }}</p>
</md-dialog-content>
<md-dialog-actions align="right">
<button md-raised-button
md-dialog-close
id="modal-close-btn">
{{ buttonOptions.closeText }}
</button>
<button md-raised-button
*ngIf="buttonOptions.enableNext"
id="modal-next-button"
(click)="dialogRef.close(true)">
{{ buttonOptions?.nextText }}
</button>
</md-dialog-actions>`,
})
export class CommonModalComponent {
/**
* {string} The text for the header or title of the dialog.
*/
title: string;
/**
* {string} The text for the body or content of the dialog.
*/
message: string;
/**
* closeText {string} The text of the close button. (No, Done, Cancel, etc)
* nextText {string} The text of the confirming button. (Yes, Next, etc)
* enableNext {boolean} True to show the next button. False to hide it.
*/
buttonOptions: {
closeText: string,
nextText?: string,
enableNext: boolean
};
constructor(public dialogRef: MdDialogRef<CommonModalComponent>) { }
}