import { Component , Inject } from '@angular/core' ; import { MAT_DIALOG_DATA , MatDialogRef } from '@angular/material/dialog' ; import { ObSpinnerService } from '@oblique/oblique' ; import { ObIDialogData } from '../dialog.model' ; @ Component ( { selector : 'sc-example-dialog' , templateUrl : './example-dialog.component.html' } ) export class ExampleDialogComponent { constructor ( public dialogRef , @ Inject ( MAT_DIALOG_DATA ) public data , spinner ) { spinner . activate ( ) ; setTimeout ( ( ) => spinner . deactivate ( ) , 2000 ) ; } onCancel ( ) { this . dialogRef . close ( ) ; } }