Skip to content

Instantly share code, notes, and snippets.

@navix
Created October 3, 2025 09:44
Show Gist options
  • Select an option

  • Save navix/cf4931a10a735b90620e368e6e8b706a to your computer and use it in GitHub Desktop.

Select an option

Save navix/cf4931a10a735b90620e368e6e8b706a to your computer and use it in GitHub Desktop.
Set Angular signal input
import type {InputSignal} from '@angular/core';
import {SIGNAL, signalSetFn} from '@angular/core/primitives/signals';
export function setInput<T>(input: InputSignal<T>, value: T) {
const node = input[SIGNAL];
signalSetFn(node, value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment