Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

@angular/elements custom element property getter returns a function for signal inputs #62097

Copy link
Copy link
@vvolodin

Description

@vvolodin
Issue body actions

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

No one assigned

    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

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.