Storage Service
class StorageService
This service is a wrapper for communicating with window.localStorage
and window.sessionStorage
, which manage long-term and short-term storage respectively.
It:
Attaches a prefix to keys to avoid conflicts with keys set elsewhere.
Clears storage and gets, sets and deletes keys when requested.
Serialises and deserialises values in a safe manner.
It only accepts keys defined in Local Storage Key or Session Storage Key.
storage.service.ts
Last updated