Skip to content

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

Closed
chintankavathia wants to merge 1 commit intoangular:mainfrom
chintankavathia:fix/element/signal/getter
Closed

fix(elements): return value on signal input getter#62113
chintankavathia wants to merge 1 commit intoangular:mainfrom
chintankavathia:fix/element/signal/getter

Conversation

@chintankavathia
Copy link
Copy Markdown
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
Copy Markdown
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
@chintankavathia chintankavathia force-pushed the fix/element/signal/getter branch from 39957d5 to c83214b Compare June 19, 2025 04:29
@JeanMeche JeanMeche marked this pull request as draft June 27, 2025 11:45
@JeanMeche
Copy link
Copy Markdown
Member

Converting to draft, as we'll look at it again when we enter the v21 breaking change window.

@JeanMeche JeanMeche marked this pull request as ready for review August 21, 2025 19:11
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
@JeanMeche JeanMeche force-pushed the fix/element/signal/getter branch from c83214b to 1972f9c Compare October 1, 2025 00:15
@JeanMeche
Copy link
Copy Markdown
Member

TGP is "green"

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: major This PR is targeted for the next major release labels Oct 1, 2025
@kirjs
Copy link
Copy Markdown
Contributor

kirjs commented Oct 1, 2025

This PR was merged into the repository. The changes were merged into the following branches:

@kirjs kirjs closed this in be0455a Oct 1, 2025
napulitanfrontend pushed a commit to napulitanfrontend/angular that referenced this pull request Oct 10, 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

PR Close angular#62113
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: elements Issues related to Angular Elements breaking changes detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release

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

5 participants