import { Component , Inject } from '@angular/core' ; import { MatDialogRef , MAT_DIALOG_DATA } from '@angular/material' ; @ Component ( { selector : 'video-dialog' , template : `
    <iframe [src]='data.url' frameborder='0' allow='autoplay; encrypted-media' allowfullscreen></iframe>` , styles : [ `
    iframe{
        width: 100%;
        height: 98%;
    }
    ` ] } ) export class VideoDialogComponent { constructor ( public dialogRef , @ Inject ( MAT_DIALOG_DATA ) public data ) { } onNoClick ( ) { this . dialogRef . close ( ) ; } }