src/app/shared/info-dialog.component.ts
selector | info-dialog |
template |
|
Properties |
constructor(dialogRef: MatDialogRef
|
|||||||||
Defined in src/app/shared/info-dialog.component.ts:18
|
|||||||||
Parameters :
|
Public data |
data:
|
Type : any
|
Decorators :
@Inject(MAT_DIALOG_DATA)
|
Defined in src/app/shared/info-dialog.component.ts:22
|
Public dialogRef |
dialogRef:
|
Type : MatDialogRef<InfoDialogComponent>
|
Defined in src/app/shared/info-dialog.component.ts:21
|
import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
@Component({
selector: 'info-dialog',
template: `
<h2 mat-dialog-title>Info</h2>
<mat-dialog-content>
{{ data }}
</mat-dialog-content>
<mat-dialog-actions align="end">
<button type="button" mat-raised-button [mat-dialog-close]="false">No</button>
<button type="button" mat-raised-button color="accent" [mat-dialog-close]="true">Yes</button>
</mat-dialog-actions>
`,
styles: []
})
export class InfoDialogComponent {
constructor(
public dialogRef: MatDialogRef<InfoDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: any
) { }
}