Gets or set a value from storage. Unlike getItem and setItem, the value is not required to be a string. All values will be serialized to string prior to being stored. To specify serialization, {@link StorageOptions#transformer}
NOTE: BaseStorage is an abstract class but the documentation generator makes no distintion.
Initializes the storage system by attaching to the angular2 change detection system and the Storage event system. Then syncronizes the object with data from storage while respecting the options set. LocalStorage
The Zone handling angular 2 change detection.
An object that implements the Storage interface. Generally localStorage or sessionStorage
An object that implements the JSON interface. This is injected using the SERDES_OBJECT
Contains the options that will be used with the instance
The number of values this instance is managing
Removes all keys managed by the storage object.
Retrieves data stored is storage.
The identifier used to locate data in storage.
Retrieves data from the object stored as a property.
Retrieves an identifier
The position at which to look for an identifier. Index be at least zero and must be less than length.
Deletes data stored in storage
The identifier used to locate the data to be deleted
Stores data in storage
The identifier to associate stored data with
The data to place in storage
Stores data in a private private property that will not be stored in storage. This is necessary because creating a class property results in an extra key in storage.
Generated using TypeDoc
BaseStorage is where all the implementation of the storage system resides. This can be used to make custom storage objects if needed but more than likely,
LocalStorage
andSessionStorage
will handle everything you need and creating services around those will be easier than creating a new storage object. But for those situations where something else is needed, this is the class for you.NOTE: BaseStorage is an abstract class but the documentation generator makes no distintion.