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.
readonly count = injectAtom(countAtom)
// read in template: {{ count() }}
// write in class: this.count.set(5)
// this.count.set(prev => prev + 1)
readonly count = injectAtom(countAtom)
// read in template: {{ count() }}
// write in class: this.count.set(5)
// this.count.set(prev => prev + 1)
T
WritableAtomSignal(): T;
WritableAtomSignal(): T;
Defined in: packages/angular-store/src/injectAtom.ts:23
Read the current value.
T
set: (fn) => void & (value) => void;
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).
Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.