Store Docs
Getting Started
AI/LLM: This documentation page is available in plain markdown format at/store/latest/docs/framework/angular/reference/interfaces/WritableAtomSignal.md
WritableAtomSignal
Defined in: packages/angular-store/src/injectAtom.ts:21
A callable signal that reads the current atom value when invoked and exposes a .set method matching the atom's native setter contract.
This is the Angular-idiomatic return type for injectAtom. It can be used as a class property and called directly in templates.
Example#
ts
readonly count = injectAtom(countAtom)
// read in template: {{ count() }}
// write in class: this.count.set(5)
// this.count.set(prev => prev + 1)Type Parameters#
T#
T
ts
WritableAtomSignal(): T;Defined in: packages/angular-store/src/injectAtom.ts:23
Read the current value.
Returns#
T
Properties#
set#
ts
set: (fn) => void & (value) => void;Defined in: packages/angular-store/src/injectAtom.ts:25
Set the atom value (accepts a direct value or an updater function).