Skip to content
Snippets Groups Projects
confirmation-dialog.component.ts 597 B
Newer Older
  • Learn to ignore specific revisions
  • import { Component, Inject } from '@angular/core';
    import { MAT_DIALOG_DATA } from '@angular/material/dialog';
    
    @Component({
    
      selector: 'aspect-confirmation-dialog',
    
      template: `
        <mat-dialog-content>
            {{data.text}}
        </mat-dialog-content>
        <mat-dialog-actions>
    
          <button mat-button [mat-dialog-close]="true">{{'confirm' | translate }}</button>
    
          <button mat-button mat-dialog-close>{{'cancel' | translate }}</button>
        </mat-dialog-actions>
        `
    })
    export class ConfirmationDialogComponent {
      constructor(@Inject(MAT_DIALOG_DATA) public data: { text: string }) { }
    }