StateKey
A type-safe key to use with TransferState
.
Deprecated: StateKey
has moved, please import StateKey
from @angular/core
instead.
type StateKey<T> = StateKeyFromCore<T>;
Description
Example:
const COUNTER_KEY = makeStateKey<number>('counter');
let value = 10;
transferState.set(COUNTER_KEY, value);