Created
October 3, 2025 09:44
-
-
Save navix/cf4931a10a735b90620e368e6e8b706a to your computer and use it in GitHub Desktop.
Set Angular signal input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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