1 namespace app.services {
4 private $uibModal: ng.ui.bootstrap.IModalService;
5 private modalOption: ng.ui.bootstrap.IModalSettings;
6 public static $inject = ['$uibModal'];
8 constructor($uibModal: ng.ui.bootstrap.IModalService) {
9 this.$uibModal = $uibModal;
18 public open(modalName: string): ng.ui.bootstrap.IModalServiceInstance {
19 //public open(modalName: string): string {
20 if(modalName === 'SelectCommand') {
21 //this.modalOption.controller = 'SelectCommandController';
22 this.modalOption.templateUrl = 'templates/select-command.html';
23 this.modalOption.size = 'lg';
25 return this.$uibModal.open(this.modalOption);
30 public selectCommand(): ng.ui.bootstrap.IModalServiceInstance {
31 this.modalOption.templateUrl = 'templates/select-command.html';
32 this.modalOption.controller = 'selectCommandController';
33 this.modalOption.controllerAs = 'c';
34 this.modalOption.size = 'lg';
35 return this.$uibModal.open(this.modalOption);
38 public preview(): ng.ui.bootstrap.IModalServiceInstance {
39 this.modalOption.templateUrl = 'templates/preview.html';
40 this.modalOption.controller = 'previewController';
41 this.modalOption.controllerAs = 'c';
42 this.modalOption.size = 'lg';
43 return this.$uibModal.open(this.modalOption);
46 public upload(): ng.ui.bootstrap.IModalServiceInstance {
47 this.modalOption.templateUrl = 'templates/upload.html';
48 this.modalOption.controller = 'uploadController';
49 this.modalOption.controllerAs ='c';
50 this.modalOption.size = 'lg';
51 return this.$uibModal.open(this.modalOption);