state service

This commit is contained in:
Kyle Spearrin 2016-12-07 00:12:16 -05:00
parent d16b9920ec
commit 4541185a51
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,21 @@
angular
.module('bit.services')
.factory('stateService', function () {
var _service = {},
_state = {};
_service.saveState = function (key, data) {
_state[key] = data;
};
_service.getState = function (key) {
if (key in _state) {
return _state[key];
}
return null;
};
return _service;
});

View File

@ -43,6 +43,7 @@
<script src="app/services/backgroundService.js"></script>
<script src="app/services/loginService.js"></script>
<script src="app/services/validationService.js"></script>
<script src="app/services/stateService.js"></script>
<script src="app/global/globalModule.js"></script>
<script src="app/global/mainController.js"></script>