Title: Signal Queries are populated before the input have been set on the components · Issue #59067 · angular/angular · GitHub
Open Graph Title: Signal Queries are populated before the input have been set on the components · Issue #59067 · angular/angular
X Title: Signal Queries are populated before the input have been set on the components · Issue #59067 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description Just updated to Angular v19 and started to experience an error. Created an example with as minimal code as possible. Unfortu...
Open Graph Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description Just updated to Angular v19 and started to experience an error. Created an example w...
X Description: Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description Just updated to Angular v19 and started to experience an error. Created an examp...
Opengraph URL: https://github.com/angular/angular/issues/59067
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Signal Queries are populated before the input have been set on the components","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nDon't known / other\n\n### Is this a regression?\n\nYes\n\n### Description\n\nJust updated to Angular v19 and started to experience an error. Created an example with as minimal code as possible. Unfortunately it doesn't make too much sense without additional context, but it is what it is.\n\nSo the setup is the following:\n- We have a directive that has a required input (`ModelDirective`)\n- We have a component that queries a `ModelDirective` and uses its required input (`FormFieldComponent`)\n- We also need to turn that input signal into an rxjs observable (for reasons that is not obvious by the example)\n\nThe problem is observed within the `toObservable` but only if the queried directive is created dynamically within a dynamically created component. If you run the example, you can see that the input is actually set properly - if we directly use the computed signal, its value is successfully displayed. However, once we try to read the observable's value, an error is thrown.\n\nIf, however, the directive or the owning component is available without any condition, everything works fine (there is a commented line in the example template).\n\nThis setup was working fine in Angular v18.\n\n### Please provide a link to a minimal reproduction of the bug\n\nhttps://stackblitz.com/edit/stackblitz-starters-vjskep?file=src%2Fmain.ts\n\n### Please provide the exception or error you saw\n\n```true\nERROR RuntimeError: NG0950: Input is required but no value is available yet.\n```\n\n### Please provide the environment you discovered this bug in (run `ng version`)\n\n```true\nAngular CLI: 19.0.3\nNode: 20.11.1\nPackage Manager: npm 10.2.4\nOS: win32 x64\n\nAngular: 19.0.3\n... animations, cli, common, compiler, compiler-cli, core\n... localize, platform-browser, platform-browser-dynamic, router\n\nPackage Version\n---------------------------------------------------------\n@angular-devkit/architect 0.1800.3\n@angular-devkit/build-angular 19.0.3\n@angular-devkit/core 18.0.3\n@angular-devkit/schematics 18.2.11\n@angular/cdk 19.0.2\n@schematics/angular 18.2.11\nng-packagr 19.0.1\nrxjs 7.8.1\ntypescript 5.5.4\nzone.js 0.15.0\n```\n\n### Anything else?\n\n_No response_","author":{"url":"https://github.com/csisy-bt4w","@type":"Person","name":"csisy-bt4w"},"datePublished":"2024-12-05T13:51:03Z","url":"https://github.com/angular/angular/issues/59067"}
| 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:9c27591f-a45b-afb2-7d1d-a25c09c6c95b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9556:27D3AD:126F339:176A1D0:6B011DC1 |
| html-safe-nonce | 85b91099a03627925c0fed7464e49e02297f9897b7ee697a12486b30152679bc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTU2OjI3RDNBRDoxMjZGMzM5OjE3NkExRDA6NkIwMTFEQzEiLCJ2aXNpdG9yX2lkIjoiNDQxNjg3MjI3Nzk3NTU3MTkwNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 641a72ca535b79b08964a8feff7ec3613d8df9a651fc6a4ed970b37399618e31 |
| hovercard-subject-tag | issue:2720477957 |
| 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/59067/issue_layout |
| twitter:image | https://opengraph.githubassets.com/866a9aa4f485e013cdca63d7bf87291909cd974ebaa04152aa41cd441958f70b/angular/angular/issues/59067 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/866a9aa4f485e013cdca63d7bf87291909cd974ebaa04152aa41cd441958f70b/angular/angular/issues/59067 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? Don't known / other Is this a regression? Yes Description Just updated to Angular v19 and started to experience an error. Created an example w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | csisy-bt4w |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width