Store Docs
Getting Started
AI/LLM: This documentation page is available in plain markdown format at/store/latest/docs/framework/angular/reference/functions/injectStore-1.md
injectStore
ts
function injectStore<TState, TSelected>(
store,
selector?,
options?): Signal<TSelected>;Defined in: packages/angular-store/src/injectStore.ts:20
Deprecated alias for injectSelector.
Type Parameters#
TState#
TState
TSelected#
TSelected = NoInfer<TState>
Parameters#
store#
SelectionSource<TState>
selector?#
(state) => TSelected
options?#
CompatibilityInjectStoreOptions<TSelected>
Returns#
Signal<TSelected>
Example#
ts
readonly count = injectStore(counterStore, (state) => state.count)Deprecated#
Use injectSelector instead.