mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-27 17:18:04 +01:00
state service
This commit is contained in:
parent
d16b9920ec
commit
4541185a51
21
src/popup/app/services/stateService.js
Normal file
21
src/popup/app/services/stateService.js
Normal 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;
|
||||
});
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user