Unique key of this data.
Value that is used if it's not stored before.
Private
Readonly
_Signal containing latest value.
Private
_Data value that's stored.
Readonly
changeEmits when the stored data is changed.
Readonly
defaultValue that is used if it's not stored before.
Readonly
keyUnique key of this data.
Last value that was set, can be changed without effecting storage.
For OnPush components, use signal
instead.
Readonly
signalSignal containing latest value (read-only).
the current value of stored data.
When you want a variable to stay in local storage and load it with a single line of code.
T is type of data to store.