Created
September 17, 2014 22:03
-
-
Save vinicius33/cbe7f40d075cd26a10f8 to your computer and use it in GitHub Desktop.
$global service angularjs
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
/** | |
* App Services Module | |
*/ | |
angular | |
.module('app.services', []) | |
.factory('$global', [function () { | |
this.settings = { | |
fullScreen: false, | |
fooProperty: true | |
}; | |
this.get = function (key) { | |
return this.settings[key]; | |
}; | |
this.set = function (key, val) { | |
this.settings[key] = val; | |
} | |
this.getSettings = function () { | |
return this.settings; | |
} | |
}]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment