DialogSettings

The settings that can be used when the Dialog is opened through DialogService.
(see example).

actions? DialogAction[] | any[] | TemplateRef<any>

Sets the action buttons of the Dialog.

actionsLayout? ActionsLayout

Specifies the layout of the action buttons in the Dialog.

appendTo? ViewContainerRef

Defines the container in which the Dialog will be inserted.
Specifying this option changes the place in the page hierarchy where the Dialog will be inserted.
The styling of the component will remain the same.

autoFocusedElement? string

Sets the focused element query selector.

closeTitle? string

Specifies the title of the close button.

content? string | TemplateRef<any> | Function

Defines the content of the Dialog.
(see example).

height? number | string

Specifies the height of the Dialog.
A numeric value sets the height in pixels.
A string value sets the height in arbitrary units—for example, 50%.

maxHeight? number | string

Specifies the maximum height of the Dialog.
A numeric value sets the maximum height in pixels.
A string value sets the maximum height in arbitrary units—for example, 50%.

maxWidth? number | string

Specifies the maximum width of the Dialog.
A numeric value sets the maximum width in pixels.
A string value sets the maximum width in arbitrary units—for example, 50%.

minHeight? number | string

Specifies the minimum height of the Dialog.
A numeric value sets the minimum height in pixels.
A string value sets the minimum height in arbitrary units—for example, 50%.

minWidth? number | string

Specifies the minimum width of the Dialog.
A numeric value sets the minimum width in pixels.
A string value sets the minimum width in arbitrary units—for example, 50%.

preventAction? (ev: DialogResult, dialogRef?: DialogRef) => boolean

Defines a predicate that verifies if the pressed dialog action should be prevented. Returning true from the predicate prevents the dialog from closing.
If the Close button of the title bar is clicked, DialogResult is a DialogCloseResult instance.
If the Dialog is closed through the action buttons, DialogResult contains the object that was passed when the Dialog was opened. (see example)

title? string

Sets the title of the Dialog. If title is omitted,
the Dialog will not render a Close button.

width? number | string

Specifies the width of the Dialog.
A numeric value sets the width in pixels.
A string value sets the width in arbitrary units—for example, 50%.