File

projects/netgrif-components-core/src/lib/dialog/models/abstract-dialog.component.ts

Description

Abstract dialog for all types of dialog components is used for data injection and dialog reference holding.

Metadata

selector ncc-abstract-dialog

Index

Properties
Methods

Constructor

Protected constructor(dialogRef: MatDialogRef<T | DialogResult>, data: DialogData)

Only injecting.

Parameters :
Name Type Optional Description
dialogRef MatDialogRef<T | DialogResult> No

Reference to a dialog opened via the MatDialog service.

data DialogData No

Injected data that was passed in to a dialog.

Methods

Public Abstract onClose
onClose(isSubmitted?: boolean)

On close dialog or on click answer button closed current open modal dialog.

Parameters :
Name Type Optional
isSubmitted boolean Yes
Returns : any

Properties

Public data
Type : DialogData
Decorators :
@Inject(MAT_DIALOG_DATA)
Injected data that was passed in to a dialog.
Public dialogRef
Type : MatDialogRef<T | DialogResult>
Reference to a dialog opened via the MatDialog service.
import {Component, Inject} from '@angular/core';
import {DialogData} from './DialogData';
import {DialogResult} from './DialogResult';
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';

/** Abstract dialog for all types of dialog components is used for data injection and dialog reference holding. */
@Component({
    selector: 'ncc-abstract-dialog',
    template: ''
})
export abstract class AbstractDialogComponent<T> {
    /**
     * Only injecting.
     * @param dialogRef Reference to a dialog opened via the MatDialog service.
     * @param data Injected data that was passed in to a dialog.
     */
    protected constructor(public dialogRef: MatDialogRef<T, DialogResult>, @Inject(MAT_DIALOG_DATA) public data: DialogData) {
    }

    /** On close dialog or on click answer button closed current open modal dialog. */
    public abstract onClose(isSubmitted?: boolean);

}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""