### File

`src/app/shared/dialog/confirm-dialog/confirm-dialog-test.component.ts`

### Metadata

selector | `hi-confirm-dialog-test`
styleUrls | `./confirm-dialog.component.scss`
template |
    <button mat-flat-button (click)="openDialog()">   Open Dialog
     </button>

### Index

###### Properties
Public dialog
###### Methods
Public openDialog
###### Inputs
data

### Constructor

`constructor(dialog: MatDialog)`
Defined in src/app/shared/dialog/confirm-dialog/confirm-dialog-test.component.ts:17
Parameters :
Name | Type | Optional
dialog | `MatDialog` | No

### Inputs

data
Type : `any`
Defined in src/app/shared/dialog/confirm-dialog/confirm-dialog-test.component.ts:17

### Methods

Public openDialog
`openDialog()`
Defined in src/app/shared/dialog/confirm-dialog/confirm-dialog-test.component.ts:21
Returns : `void`

### Properties

Public dialog
Type : `MatDialog`
Defined in src/app/shared/dialog/confirm-dialog/confirm-dialog-test.component.ts:19

    import { Component, OnInit, Input } from '@angular/core';
    import { MatDialog, MatDialogModule } from '@angular/material/dialog';
    import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
    import { MaterialModule } from 'app/shared/material.module';
    import { ConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.component';

    // Wrapper component for testing approach recommended in this answer:
    // https://stackoverflow.com/a/63953851/1732222
    @Component({
      selector: 'hi-confirm-dialog-test',
      template: ` <button mat-flat-button (click)="openDialog()">
        Open Dialog
      </button>`,
      styleUrls: ['./confirm-dialog.component.scss'],
    })
    export class ConfirmDialogTestComponent {
      @Input() data: any;

      constructor(public dialog: MatDialog) {}

      public openDialog(): void {
        this.dialog.open(ConfirmDialogComponent, {
          data: this.data,
        });
      }
    }

    export default () => ({
      moduleMetadata: {
        _imports: [BrowserAnimationsModule, MatDialogModule, MaterialModule],
        get imports() {
          return this._imports;
        },
        set imports(value) {
          this._imports = value;
        },
        declarations: [ConfirmDialogTestComponent],
      },
      component: ConfirmDialogTestComponent,
    });

`./confirm-dialog.component.scss`

Legend
Html element
Component
Html element with directive

# results matching ""

# No results matching ""