export interface IConfirmService { show ( title , msg ) : angular . IPromise < any > ; } export class ConfirmService implements IConfirmService { static $inject = [ '$modal' ] ; $modal : angular . ui . bootstrap . IModalService ; constructor ( $modal ) { this . $modal = $modal ; } show ( title , msg ) { var mi ; mi = this . $modal . open ( { templateUrl : 'app/services/confirm.html' , controller : ConfirmController , controllerAs : 'vm' , bindToController : true , resolve : { title : ( ) => { return title ; } , msg : ( ) => { return msg ; } } , backdrop : 'static' , animation : false } ) ; return mi . result ; } } class ConfirmController { $modalInstance : angular . ui . bootstrap . IModalServiceInstance ; title : string ; msg : string ; constructor ( $modalInstance , title , msg ) { this . $modalInstance = $modalInstance ; this . title = title ; this . msg = msg ; } ok ( ) { this . $modalInstance . close ( 'ok' ) ; } cancel ( ) { this . $modalInstance . dismiss ( ) ; } }