File

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

Metadata

changeDetection ChangeDetectionStrategy.OnPush
selector app-error-dialog
styleUrls ./error-dialog.component.scss
templateUrl ./error-dialog.component.html

Index

Properties

Constructor

constructor(data: any)
Parameters :
Name Type Optional
data any No

Properties

Public data
Type : any
Decorators :
@Inject(MAT_DIALOG_DATA)
import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';

@Component({
  selector: 'app-error-dialog',
  templateUrl: './error-dialog.component.html',
  styleUrls: ['./error-dialog.component.scss'],
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class ErrorDialogComponent {
  constructor(@Inject(MAT_DIALOG_DATA) public data: any) {}
}
<div>
  <div>
    <p>Message: {{ data.message }}</p>
    <p *ngIf="data.status">Status: {{ data?.status }}</p>
  </div>
</div>

./error-dialog.component.scss

Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""