1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-06 03:50:04 +02:00
OpenSTF/res/app/components/stf/app-state/app-state-provider.js
2016-01-19 23:08:33 +09:00

24 lines
437 B
JavaScript

module.exports = function AppStateProvider() {
var values = {
config: {
websocketUrl: ''
},
user: {
settings: {}
}
}
/* global 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
}
}
}