@s-libs/ng-mat-core
    Preparing search index...

    Class SlDialogService

    Shows simple text dialogs with just a method call, and reduces boilerplate for more complex dialogs.

    A simple text dialog:

    const choice = await slDialogService.open({
    text: 'Discard draft?',
    buttons: [{ text: 'Cancel' }, { text: 'Discard' }]
    });
    if (choice === 'Discard') {
    // discard the draft
    }

    Using a custom component:

    @Component({
    template: `
    <h3>Heading 1</h3>
    <p>Paragraph 1</p>
    <h3>Heading 2</h3>
    <p>Paragraph 2</p>
    `
    })
    class FancyDialogComponent {}

    slDialogService.open({
    title: 'My title',
    component: FancyDialogComponent,
    });
    Index

    Constructors

    Methods

    Constructors

    Methods