File

src/app/shared/info-dialog.component.ts

Metadata

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>

Index

Properties

Constructor

constructor(dialogRef: MatDialogRef, data: any)
Parameters :
Name Type Optional
dialogRef MatDialogRef<InfoDialogComponent> No
data any No

Properties

Public data
data: any
Type : any
Decorators :
@Inject(MAT_DIALOG_DATA)
Public dialogRef
dialogRef: MatDialogRef<InfoDialogComponent>
Type : MatDialogRef<InfoDialogComponent>
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
    ) { }

}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""