angular.module('configuration').factory('configurationService', function($http, liftAppConfig, $mdDialog) { var configurationService = {}; configurationService.GetVersion = function () { var sURI = "./deploy.json"; //$http.get(sURI).success(function (deployConfig) { $.ajax(sURI, { async: false, dataType: 'json' }) .success(function (deployConfig) { for (var p in deployConfig) { liftAppConfig[p] = deployConfig[p]; } }) .error(function (e) { $mdDialog.show( $mdDialog.alert() .title('Error') .content("Fail to load initialization configuration.") .ok('OK') ); }); }; return configurationService; });