import { Inject , Injectable } from '@angular/core' ; import { WINDOW } from '../utilities' ; @ Injectable ( { providedIn : 'root' } ) export class ObPopUpService { private readonly window : Window ; constructor ( @ Inject ( WINDOW ) window ) { this . window = window ; } public confirm ( message ? ) { return this . window . confirm ( message ) ; } public alert ( message ? ) { this . window . alert ( message ) ; } public prompt ( message ? , _default ? ) { return this . window . prompt ( message , _default ) ; } }