• Overview
@angular/core

linkedSignal

function
  
    
  
  
function linkedSignal<D>(computation: () => D, options?: { equal?: ValueEqualityFn<NoInfer<D>> | undefined; } | undefined): WritableSignal<D>;

Creates a writable signals whose value is initialized and reset by the linked, reactive computation.

@paramcomputation() => D
@paramoptions{ equal?: ValueEqualityFn<NoInfer<D>> | undefined; } | undefined
@returnsWritableSignal<D>
function linkedSignal<S, D>(options: { source: () => S; computation: (source: NoInfer<S>, previous?: { source: NoInfer<S>; value: NoInfer<D>; } | undefined) => D; equal?: ValueEqualityFn<NoInfer<D>> | undefined; }): WritableSignal<D>;

Creates a writable signals whose value is initialized and reset by the linked, reactive computation. This is an advanced API form where the computation has access to the previous value of the signal and the computation result.

Note: The computation is reactive, meaning the linked signal will automatically update whenever any of the signals used within the computation change.

@paramoptions{ source: () => S; computation: (source: NoInfer<S>, previous?: { source: NoInfer<S>; value: NoInfer<D>; } | undefined) => D; equal?: ValueEqualityFn<NoInfer<D>> | undefined; }
@returnsWritableSignal<D>
Jump to details