Title: Mark FormControlDirective as standalone · Issue #56805 · angular/angular · GitHub
Open Graph Title: Mark FormControlDirective as standalone · Issue #56805 · angular/angular
X Title: Mark FormControlDirective as standalone · Issue #56805 · angular/angular
Description: Which @angular/* package(s) are relevant/related to the feature request? forms Description It would be nice, if possible, to mark the FormControlDirective as a standalone component. That way it can be used as hostDirective in other compo...
Open Graph Description: Which @angular/* package(s) are relevant/related to the feature request? forms Description It would be nice, if possible, to mark the FormControlDirective as a standalone component. That way it can...
X Description: Which @angular/* package(s) are relevant/related to the feature request? forms Description It would be nice, if possible, to mark the FormControlDirective as a standalone component. That way it can...
Opengraph URL: https://github.com/angular/angular/issues/56805
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Mark FormControlDirective as standalone","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\r\n\r\nforms\r\n\r\n### Description\r\n\r\nIt would be nice, if possible, to mark the FormControlDirective as a standalone component. That way it can be used as hostDirective in other components. For instance, we are using it (with workaround), to dynamically render and bind form-inputs. \r\n\r\nCurrently the following error is shown when the directive is used as host-directive.\r\n\r\n`[ERROR] TS-992014: Host directive FormControlDirective must be standalone [plugin angular-compiler]`\r\n\r\n\r\n\r\nWith the following piece of code\r\n\r\n```\r\nhostDirectives: [ {\r\n directive: FormControlDirective,\r\n inputs: [ 'formControl' ]\r\n} ]\r\n```\r\n\r\n### Proposed solution\r\n\r\nMark FormControlDirective as standalone\r\n\r\n### Alternatives considered\r\n\r\nCurrently we extend the FormControlDirective, so it can be marked to as standalone without any other changes. That custom component we can than use as HostDirective.\r\n\r\n```\r\nimport { Directive } from '@angular/core';\r\nimport { FormControlDirective } from '@angular/forms';\r\n\r\n@Directive( {\r\n standalone: true\r\n} )\r\nexport class HostFormControlDirective extends FormControlDirective {\r\n}\r\n```\r\n\r\n[stackblitz example](https://stackblitz.com/edit/angular-issue-56805?file=src%2Fexample%2Fexample.component.ts)","author":{"url":"https://github.com/bdorresteijn-visma","@type":"Person","name":"bdorresteijn-visma"},"datePublished":"2024-07-02T08:47:03.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/56805/angular/issues/56805"}
| 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:a2b5d7e9-98cc-26ba-f6f7-d2d070b41232 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7A0:1BBE0B:3001FBC:3E20355:6974AC97 |
| html-safe-nonce | abb7495a51801b60dfa48b1e0e168459c3ecbfe22ce5774d26b559eb9a210acf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0EwOjFCQkUwQjozMDAxRkJDOjNFMjAzNTU6Njk3NEFDOTciLCJ2aXNpdG9yX2lkIjoiMzA4OTM5MjU4NjQ4OTkwMDE4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e9dddc225865cc470b80a6bd91b7e839f55d7bf036a8beebaeab3459b17364c8 |
| hovercard-subject-tag | issue:2385637347 |
| 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/56805/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1faf7d2ee313ed35163337277187168ffcabe49986ef1985fbfd2c6c570536e9/angular/angular/issues/56805 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1faf7d2ee313ed35163337277187168ffcabe49986ef1985fbfd2c6c570536e9/angular/angular/issues/56805 |
| og:image:alt | Which @angular/* package(s) are relevant/related to the feature request? forms Description It would be nice, if possible, to mark the FormControlDirective as a standalone component. That way it can... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bdorresteijn-visma |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width