Interface DialogData<T>

interface DialogData<T> {
    buttons?: DialogButton<T>[];
    component?: Type<any> & {
        title?: string;
    };
    slDialogData?: any;
    text?: string;
    title?: string;
}

Type Parameters

  • T

Properties

buttons?: DialogButton<T>[]
component?: Type<any> & {
    title?: string;
}

A custom component to project into the dialog's content. It will appear below text, if both are defined. Note that you may put a static title attribute on the dialog class itself instead of using the DialogData.title option above. If both are defined, the option above will be used.

Type declaration

  • Optional title?: string
slDialogData?: any

Use this to supply input to a custom component. Inject it into the component using the SL_DIALOG_DATA injection token.

@Component({ template: '{{ myInput }}' })
class MyDialogComponent {
constructor(@Inject(SL_DIALOG_DATA) public myInput: string) {}
}

slDialogService.open({
component: MyDialogComponent,
slDialogData: 'My input.',
});
text?: string

Shown as the main content of the dialog.

title?: string