Title: Resurrect discussion: bindToComponentInputs=true breaks default/initial value of field with @Input() · Issue #63835 · angular/angular · GitHub
Open Graph Title: Resurrect discussion: bindToComponentInputs=true breaks default/initial value of field with @Input() · Issue #63835 · angular/angular
X Title: Resurrect discussion: bindToComponentInputs=true breaks default/initial value of field with @Input() · Issue #63835 · angular/angular
Description: Describe the problem that you experienced The initial issue, #52946, has long since been locked. However I do not believe the discussion has been concluded, or at least there is more documentation to be updated. I believe it to still be ...
Open Graph Description: Describe the problem that you experienced The initial issue, #52946, has long since been locked. However I do not believe the discussion has been concluded, or at least there is more documentation ...
X Description: Describe the problem that you experienced The initial issue, #52946, has long since been locked. However I do not believe the discussion has been concluded, or at least there is more documentation ...
Opengraph URL: https://github.com/angular/angular/issues/63835
X: @github
Domain: github.com
IPv4 address: 140.82.113.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Resurrect discussion: bindToComponentInputs=true breaks default/initial value of field with @Input()","articleBody":"### Describe the problem that you experienced\n\nThe initial issue, #52946, has long since been locked. However I do not believe the discussion has been concluded, or at least there is more documentation to be updated. I believe it to still be intentional, though unexpected behavior that optional inputs with a default value that are _not_ in the router config have their values set to undefined. That said, some excellent workarounds were provided [here](https://github.com/angular/angular/issues/52946#issuecomment-2091496673) and [here](https://github.com/angular/angular/issues/52946#issuecomment-2198484477).\n\nI admit that some of the more technical explanations and rational for the current behavior kindly provided by @atscott went over my head to a degree, but I still believe this to be an ongoing issue. At one point he stated that\n\n> Setting up an input with an initial value, i.e.@Input() readonly = true;, is an initial value only to be used when the owner of the component has not (yet) bound a value. It is not a default value, but an initial value.\n\nHowever the documentation does not make any mention of this. Indeed, [the documentation for inputs](https://angular.dev/guide/components/inputs#reading-inputs) explicitly refers to this as a _default value_. There is no mention in the documentation of the value being overwritten when the component is used in a routing context.\n\nAt minimum, I believe the documentation for input signals should be updated to reflect this (I first stumbled upon this issue Googling why my default value was undefined, without having any suspicion of router issues). Alternatively, I think there was a [good suggestion](https://github.com/angular/angular/issues/52946#issuecomment-2455012957) to allow developers to include a strategy for an input, though I don't know what this would look like.\n\n### Describe what you were looking for in the documentation\n\n[This page](https://angular.dev/guide/components/inputs#reading-inputs) should indicate that the default value is not necessarily a default value, but an _initial_ value, as well as explaining its interaction with `withComponentInputBinding`/usage in a router context, if not changing implementation.","author":{"url":"https://github.com/aYorky","@type":"Person","name":"aYorky"},"datePublished":"2025-09-16T14:30:16Z","url":"https://github.com/angular/angular/issues/63835"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:57481918-6672-7c59-0fa5-79c7edf0c323 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8528:15F7F4:CA1242:1054A6C:6B064025 |
| html-safe-nonce | b9490234cb3f8e92bc9f1b4a7d3d495d176aee09077e97a575d6680e12fc4ecd |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTI4OjE1RjdGNDpDQTEyNDI6MTA1NEE2Qzo2QjA2NDAyNSIsInZpc2l0b3JfaWQiOiIyODAwNjA4ODg1NDMyNzk1MTczIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 297a2083b072da8ef655d103234dd1032e6c39c33514b97ab392b1c62b4ef997 |
| hovercard-subject-tag | issue:3422551795 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/63835/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4216777bad64a3644b3306995bd938d27e4f939722baf0220fad938a8ad53f01/angular/angular/issues/63835 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4216777bad64a3644b3306995bd938d27e4f939722baf0220fad938a8ad53f01/angular/angular/issues/63835 |
| og:image:alt | Describe the problem that you experienced The initial issue, #52946, has long since been locked. However I do not believe the discussion has been concluded, or at least there is more documentation ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aYorky |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac613d3698d3d8565651455086e1f74da07bf277 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width