Title: ViewChild in a subclass kills ViewChild in an abstract superclass · Issue #10461 · angular/angular · GitHub
Open Graph Title: ViewChild in a subclass kills ViewChild in an abstract superclass · Issue #10461 · angular/angular
X Title: ViewChild in a subclass kills ViewChild in an abstract superclass · Issue #10461 · angular/angular
Description: I'm submitting a ... (check one with "x") [ ] bug report [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question Current be...
Open Graph Description: I'm submitting a ... (check one with "x") [ ] bug report [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/ma...
X Description: I'm submitting a ... (check one with "x") [ ] bug report [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angula...
Opengraph URL: https://github.com/angular/angular/issues/10461
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ViewChild in a subclass kills ViewChild in an abstract superclass","articleBody":"**I'm submitting a ...** (check one with \"x\")\n\n```\n[ ] bug report\n[x] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\n\nIf a subclass component has any field marked `@ViewChild`, any other `@ViewChild` field in an abstract superclass will not evaluate.\n\n**Expected/desired behavior**\n\nBoth the superclass `@ViewChild` and the subclass `@ViewChild` should be populated.\n\n**Reproduction of the problem**\n\nhttps://plnkr.co/edit/w5EvslQbHMMVqjx8v52U\n\nThe superclass `@ViewChild` __does populate__ from the subclass template, but only if the subclass `@ViewChild` is commented out. \n\nIf uncommented, the subclass `@ViewChild` is populated, but the superclass one is not.\n\n**What is the expected behavior?**\n\nBoth the superclass `@ViewChild` and the subclass `@ViewChild` should be populated.\n\n**What is the motivation / use case for changing the behavior?**\n\nMultiple components that inherit common code but supply their own template. The linked plunkr demonstrates the use case where the abstract class encapsulates all the code and logic for the common feature of performing a search, while the child component provides the specific template in which the `#searchInput` element can be found and whatever other divergent behavior.\n\n**Please tell us about your environment:**\n- **Angular version:** 2.0.0-rc.4\n- **Browser:** Chrome 51\n- **Language:** TypeScript 1.8 \n","author":{"url":"https://github.com/grantbowering","@type":"Person","name":"grantbowering"},"datePublished":"2016-08-02T22:42:59Z","url":"https://github.com/angular/angular/issues/10461"}
| 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:f6339394-cb8c-e369-51b2-825d2f01c42d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9E4A:24FC21:96AACE:C408A1:6B00DFF9 |
| html-safe-nonce | e8f2786a5b60c674573713f6bb129effd3971aab15e4104fbf2e9d21c799d681 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTRBOjI0RkMyMTo5NkFBQ0U6QzQwOEExOjZCMDBERkY5IiwidmlzaXRvcl9pZCI6IjQzNDkzMDc2Mjc3NTExMzcyNzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9b40a8dcbfadb0ab901eb4a7ed24dfd790cce35405cc6a843430802eae2544e4 |
| hovercard-subject-tag | issue:169006329 |
| 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/10461/issue_layout |
| twitter:image | https://opengraph.githubassets.com/49437a01dc1c1250013e5e483ae824c69fe99fa0d784a3f2cc172689558179ac/angular/angular/issues/10461 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/49437a01dc1c1250013e5e483ae824c69fe99fa0d784a3f2cc172689558179ac/angular/angular/issues/10461 |
| og:image:alt | I'm submitting a ... (check one with "x") [ ] bug report [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | grantbowering |
| hostname | github.com |
| expected-hostname | github.com |
| None | 043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf |
| 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 | 5425dc24e8bd8d6fca9641a12afc984825a43875 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width