-
Notifications
You must be signed in to change notification settings - Fork 27k
Closed
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: elementsIssues related to Angular ElementsIssues related to Angular Elementsbugcross-cutting: signalsstate: confirmed
Milestone
Description
Which @angular/* package(s) are the source of the bug?
elements
Is this a regression?
No
Description
Angular 19 added support for signal inputs for custom elements, however the getter for the input return a function, which kind of makes sense since it's a signal, but it seems to make the API inconsistent and typings are a pain as well.
Say, in my element I have two inputs:
@Input() oldInput = '';
newInput = input('');
Now in my custom element to access my oldInput's value I can do:
elementRef.oldInput;
but for the new one I have to call it:
elementRef.newInput();
At the same time, both of them allow me to set the value in a same way:
elementRef.oldInput = 'new value';
elementRef.newInput = 'new value';
Which does make sense for oldInput, but not really for a signal input.
This is also not documented at all, and the @angular/elements article in the docs doesn’t even mention signals.
Please provide a link to a minimal reproduction of the bug
No response
Please provide the exception or error you saw
Please provide the environment you discovered this bug in (run ng version)
Anything else?
No response
Metadata
Metadata
Assignees
Labels
P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: elementsIssues related to Angular ElementsIssues related to Angular Elementsbugcross-cutting: signalsstate: confirmed