[ADF-3887] Different local storages for different ADF apps (#4539)

* [ADF-3887] Different local storages for different ADF apps

* [ADF-3887] Add documentation

* [ADF-3887] Add unit tests and improve code

* [ADF-3887] Add unit tests

* [ADF-3887] Fix e2e tests

* fix test

* fix test

* Update storage.service.md
This commit is contained in:
davidcanonieto
2019-04-08 15:23:46 +01:00
committed by Eugenio Romano
parent f89bf507f5
commit dee63e3f3b
22 changed files with 181 additions and 43 deletions

View File

@@ -44,6 +44,23 @@ more widely supported by browsers and can be set to expire after a certain date.
If local storage is not available then non-persistent memory storage within the app is
used instead.
## Storage specific to an ADF app
If you are using multiple ADF apps, you might want to set the following configuration so that the apps have specific storages and are independent of others when setting and getting data from the local storage.
In order to achieve this, you will only need to set your app identifier under the `storagePrefix` property of the app in your `app.config.json` file.
```json
"application": {
"storagePrefix": "ADF_Identifier",
"name": "Your app name",
"copyright": "Your copyright message"
}
```
**Important note**
This identifier must be unique to the app to guarantee that it has its own storage.
## See also
- [Cookie service](cookie.service.md)