Title: Contradictory guidelines in Style 05-18 (strictPropertyInitialization) · Issue #46420 · angular/angular · GitHub
Open Graph Title: Contradictory guidelines in Style 05-18 (strictPropertyInitialization) · Issue #46420 · angular/angular
X Title: Contradictory guidelines in Style 05-18 (strictPropertyInitialization) · Issue #46420 · angular/angular
Description: Description It says You may want to have a required @input field, meaning all your component users are required to pass that attribute. In such cases, use a default value But if we can define a reasonable default value - doesn't it autom...
Open Graph Description: Description It says You may want to have a required @input field, meaning all your component users are required to pass that attribute. In such cases, use a default value But if we can define a rea...
X Description: Description It says You may want to have a required @input field, meaning all your component users are required to pass that attribute. In such cases, use a default value But if we can define a rea...
Opengraph URL: https://github.com/angular/angular/issues/46420
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Contradictory guidelines in Style 05-18 (strictPropertyInitialization)","articleBody":"### Description\n\nIt says\r\n> You may want to have a required @Input field, meaning all your component users are required to pass that attribute. In such cases, use a default value\r\n\r\nBut if we can define a reasonable default value - doesn't it automatically mean we have made the input optional? And if a component user doesn't pass this input, our component still works just fine.\r\n\r\nI'm aware that a concept of \"required\" inputs has been discussed in the past (https://github.com/angular/angular/issues/11904, https://github.com/angular/angular/issues/18156, https://github.com/angular/angular/issues/24879, https://github.com/angular/angular/issues/28403, https://github.com/angular/angular/issues/30974).\r\n\r\nYet the recommendation in the styleguide doesn't seem to properly describe it and provide a path forward.\n\n### What is the affected URL?\n\nhttps://angular.io/guide/styleguide#style-05-18\n\n### Please provide the steps to reproduce the issue\n\n_No response_\n\n### Please provide the expected behavior vs the actual behavior you encountered\n\n_No response_\n\n### Please provide a screenshot if possible\n\n_No response_\n\n### Please provide the exception or error you saw\n\n_No response_\n\n### Is this a browser-specific issue? If so, please specify the device, browser, and version.\n\n_No response_","author":{"url":"https://github.com/amakhrov","@type":"Person","name":"amakhrov"},"datePublished":"2022-06-17T20:10:34Z","url":"https://github.com/angular/angular/issues/46420"}
| 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:c8ab7abe-a7d5-c9d3-6cb0-1faa16e488e8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | EAEC:A20F9:F7EAD5:14A4915:6B0107D7 |
| html-safe-nonce | de0a3ba9d11c1f810fe9aa87297d1b31f74a98199eb3bdc543ed36eab8b953e7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQUVDOkEyMEY5OkY3RUFENToxNEE0OTE1OjZCMDEwN0Q3IiwidmlzaXRvcl9pZCI6Ijc5Mzc1OTY5ODIxNDU2NDg1OTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 2e934b0cdd1b0498206a99dc044a3bd49664fb7a0ab3dcd95267c0de05b01373 |
| hovercard-subject-tag | issue:1275417233 |
| 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/46420/issue_layout |
| twitter:image | https://opengraph.githubassets.com/16c3e01734034e46d3b21052bbffc8bbf9b70b0ea46bf0106ac55e4752b2dd6a/angular/angular/issues/46420 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/16c3e01734034e46d3b21052bbffc8bbf9b70b0ea46bf0106ac55e4752b2dd6a/angular/angular/issues/46420 |
| og:image:alt | Description It says You may want to have a required @input field, meaning all your component users are required to pass that attribute. In such cases, use a default value But if we can define a rea... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | amakhrov |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width