Angular Undo Redo History Store | ng-hub-ui-history

Angular undo and redo history store with Signals-friendly APIs, transactions, limits and reactive form support.

API reference

Here's the full contract for history: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial history in with 4 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
createHistoryStore(config)HistoryStoreConfig<T, K>Creates a signal-based store with optional limits and custom diff/patch functions.
registerObject(id, initialState)Required(id: K, initialState: T) => voidRegisters object base state and starts linear history for that key.
commit(id, newState, options?)Required(id: K, state: T, options?: { label?: string }) => booleanStores diff patch, invalidates redo branch if pointer was not at tail.
watchForm(id, form, options?)(id: K, form: FormGroup, options?: WatchFormOptions) => () => voidAutomatically commits form value changes and returns unsubscribe callback.

Outputs

React to what history does — 1 events to hook your logic onto.

NameTypeDescription
statesSignal<Map<K, T>>Reactive signal map with current immutable snapshots per object id.

Templates

No templates documented yet.