Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(elements): return value on signal input getter #62113

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chintankavathia
Copy link
Contributor

@chintankavathia chintankavathia commented Jun 18, 2025

closes #62097

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #62097

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from atscott June 18, 2025 07:15
@chintankavathia chintankavathia changed the title fix(element): return value on signal input getter fix(elements): return value on signal input getter Jun 18, 2025
@chintankavathia chintankavathia force-pushed the fix/element/signal/getter branch from 2eecaf1 to d216d18 Compare June 18, 2025 08:11
@angular-robot angular-robot bot added the area: elements Issues related to Angular Elements label Jun 18, 2025
@ngbot ngbot bot added this to the Backlog milestone Jun 18, 2025
@chintankavathia chintankavathia force-pushed the fix/element/signal/getter branch 2 times, most recently from c63c5ac to 06676ee Compare June 18, 2025 13:06
Copy link
Contributor

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alxhub I think we would need to consider this a breaking change?

@chintankavathia chintankavathia force-pushed the fix/element/signal/getter branch from 06676ee to 39957d5 Compare June 19, 2025 04:24
@angular-robot angular-robot bot added the detected: breaking change PR contains a commit with a breaking change label Jun 19, 2025
BREAKING CHANGE: Fix signal input getter behavior in custom elements.

Before this change, signal inputs in custom elements required function calls to access their values (`elementRef.newInput()`), while decorator inputs were accessed directly (`elementRef.oldInput`). This inconsistency caused confusion and typing difficulties.

The getter behavior has been standardized so signal inputs can now be accessed directly, matching the behavior of decorator inputs:

Before:
- Decorator Input: `elementRef.oldInput`
- Signal Input: `elementRef.newInput()`

After:
- Decorator Input: `elementRef.oldInput`
- Signal Input: `elementRef.newInput`

closes angular#62097
@chintankavathia chintankavathia force-pushed the fix/element/signal/getter branch from 39957d5 to c83214b Compare June 19, 2025 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: elements Issues related to Angular Elements breaking changes detected: breaking change PR contains a commit with a breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@angular/elements custom element property getter returns a function for signal inputs
3 participants