state service
This commit is contained in:
parent
d16b9920ec
commit
4541185a51
|
@ -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;
|
||||||
|
});
|
|
@ -43,6 +43,7 @@
|
||||||
<script src="app/services/backgroundService.js"></script>
|
<script src="app/services/backgroundService.js"></script>
|
||||||
<script src="app/services/loginService.js"></script>
|
<script src="app/services/loginService.js"></script>
|
||||||
<script src="app/services/validationService.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/globalModule.js"></script>
|
||||||
<script src="app/global/mainController.js"></script>
|
<script src="app/global/mainController.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue