import { Component } from '@angular/core' ; import { MatDialog } from '@angular/material' ; title @ Component ( { selector : 'dialog-elements-example' , templateUrl : 'dialog-elements-example.html' , styleUrls : [ 'dialog-elements-example.css' ] , } ) export class DialogElementsExample { constructor ( public dialog ) { } openDialog ( ) { this . dialog . open ( DialogElementsExampleDialog ) ; } } @ Component ( { selector : 'dialog-elements-example-dialog' , templateUrl : 'dialog-elements-example-dialog.html' , } ) export class DialogElementsExampleDialog { }