Created
March 29, 2017 09:36
-
-
Save akleandrov/e3ff8273cd104bdeee4bb24ac96f99c4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by kleandrovaa on 12.01.2017. | |
*/ | |
/** | |
* Created by kleandrovaa on 28.12.2016. | |
*/ | |
'use strict'; | |
snfApp.factory('settingsService', function($http){ | |
let promise; | |
return { | |
async: function () { | |
//if (!promise) { | |
promise = $http.get(UrlApi + TomcatAppName + "/api/v1/settings/GetAll?login=" + Login).then(function (response) { | |
return response.data; | |
}); | |
//} | |
return promise; | |
} | |
}; | |
}); | |
snfApp.service('promptService', ['$uibModal', function (modal) { | |
const self = this; | |
self.confirm = function(message){ | |
return new Promise(function(resolve, reject) { | |
modal.open({ | |
animation: true, | |
size: "medium", | |
templateUrl: "/" + TomcatAppName + "/static/views/modal.html", | |
controller: 'modalPromptController', | |
resolve: { | |
message: {text: message} | |
} | |
}).result.then(function(response) { | |
if (response) resolve() | |
}); | |
}); | |
} | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment