1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 19:42:01 +02:00
OpenSTF/res/app/components/stf/app-state/app-state-provider.js
Gunther Brunner aad3db8828 Fixed most of the dependencies by unit testing.
Refactored TransactionService and StorageService.
2014-08-22 15:32:09 +09:00

24 lines
438 B
JavaScript

module.exports = function AppStateProvider() {
var values = {
config: {
websocketUrl: ''
},
user: {
settings: {}
}
}
/*globals GLOBAL_APPSTATE:false*/
if (typeof GLOBAL_APPSTATE !== 'undefined') {
values = angular.extend(values, GLOBAL_APPSTATE)
}
return {
set: function (constants) {
angular.extend(values, constants)
},
$get: function () {
return values
}
}
}