import { Component , OnInit } from '@angular/core' ; import { MdDialogRef } from "@angular/material" ; @ Component ( { selector : 'ws-strong-confirm-dialog' , templateUrl : './strong-confirm-dialog.component.html' , styleUrls : [ './strong-confirm-dialog.component.css' ] } ) export class StrongConfirmDialogComponent implements OnInit { public confirmContents : string ; public title : string ; public description : string ; public confirmString : string ; constructor ( public dialogRef ) { } ngOnInit ( ) { } private onConfirmClicked ( ) { this . dialogRef . close ( true ) ; } private onConfirmKeyDown ( keyEvent ) { if ( keyEvent . keyCode == 13 && this . submitEnabled ) { } } get submitEnabled ( ) : boolean { if ( this . confirmContents == null ) { return false ; } else { return this . confirmContents == this . confirmString ; } } }