Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* 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