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

feat(common): accept undefined inputs in NgTemplateOutlet #61404

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

Closed
wants to merge 1 commit into from

Conversation

rslawik
Copy link
Contributor

@rslawik rslawik commented May 16, 2025

Extend types of inputs to include undefined to avoid ?? null when using singals (e.g. viewChild).

Fixes #51225

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?

Inputs don't accept undefined

Issue Number: #51225

What is the new behavior?

Accept undefined

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pullapprove pullapprove bot requested a review from atscott May 16, 2025 11:00
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: common Issues related to APIs in the @angular/common package labels May 16, 2025
@ngbot ngbot bot modified the milestone: Backlog May 16, 2025
@pkozlowski-opensource pkozlowski-opensource removed the request for review from atscott May 21, 2025 14:57
@pullapprove pullapprove bot requested review from crisbeto, mmalerba and devversion May 21, 2025 14:57
Extend types of inputs to include `undefined` to avoid `?? null` when using singals (e.g. `viewChild`).

Fixes angular#51225
Copy link
Contributor

@mmalerba mmalerba left a comment

Choose a reason for hiding this comment

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

reviewed-for: public-api

@pullapprove pullapprove bot requested a review from kirjs May 21, 2025 15:31
Copy link
Member

@pkozlowski-opensource pkozlowski-opensource left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed-for: fw-general
Reviewed-for: public-api

Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

Might be worth a breaking change note when people are relying on the type of those public variables?

Reviewed-for: public-api

@JeanMeche
Copy link
Member

@devversion You're making a good point. If we consider it a breaking change we won't be able to land it in v20.

Maybe let the TGP decide if we consider that breaking ?

@JeanMeche
Copy link
Member

JeanMeche commented May 23, 2025

TGP is "Green" without having to cleanup g3.

I think we can consider this change non breaking.

@JeanMeche JeanMeche added action: merge The PR is ready for merge by the caretaker target: rc This PR is targeted for the next release-candidate labels May 23, 2025
@atscott
Copy link
Contributor

atscott commented May 25, 2025

This PR was merged into the repository by commit 82327f2.

The changes were merged into the following branches: main, 20.0.x

@atscott atscott closed this in 82327f2 May 25, 2025
atscott pushed a commit that referenced this pull request May 25, 2025
Extend types of inputs to include `undefined` to avoid `?? null` when using singals (e.g. `viewChild`).

Fixes #51225

PR Close #61404
@rslawik rslawik deleted the null-undefined branch May 31, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action: merge The PR is ready for merge by the caretaker area: common Issues related to APIs in the @angular/common package detected: feature PR contains a feature commit target: rc This PR is targeted for the next release-candidate
Projects
None yet
6 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.