Title: Support of abstract components · Issue #8333 · angular/angular · GitHub
Open Graph Title: Support of abstract components · Issue #8333 · angular/angular
X Title: Support of abstract components · Issue #8333 · angular/angular
Description: Steps to reproduce and a minimal demo of the problem It could be interesting to have the support of abstract components to be able to modularize shared configuration for components. For example a set of directives. The @Component decorat...
Open Graph Description: Steps to reproduce and a minimal demo of the problem It could be interesting to have the support of abstract components to be able to modularize shared configuration for components. For example a s...
X Description: Steps to reproduce and a minimal demo of the problem It could be interesting to have the support of abstract components to be able to modularize shared configuration for components. For example a s...
Opengraph URL: https://github.com/angular/angular/issues/8333
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support of abstract components","articleBody":"**Steps to reproduce and a minimal demo of the problem**\n\nIt could be interesting to have the support of abstract components to be able to modularize shared configuration for components. For example a set of directives.\n\nThe `@Component` decorator could have a look at the decorator of the parent class it applies on. This could be done like this (this code could take place in the implementation of the decorator itself:\n\n```\nexport function CustomComponent(annotation: any) {\n return function (target: Function) {\n var parentTarget = Object.getPrototypeOf(target.prototype).constructor;\n var parentAnnotations = Reflect.getMetadata('annotations', parentTarget);\n\n var parentAnnotation = parentAnnotations[0];\n Object.keys(parentAnnotation).forEach(key => {\n if (isPresent(parentAnnotation[key])) {\n annotation[key] = parentAnnotation[key];\n }\n });\n var metadata = new ComponentMetadata(annotation);\n\n Reflect.defineMetadata('annotations', [ metadata ], target);\n }\n}\n```\n\nBased on this question on Stackoverflow:\n- http://stackoverflow.com/questions/36837421/extending-component-decorator-with-base-class-decorator/\n\nSee this plunkr as a proof of concept: https://plnkr.co/edit/A2Gcs2MGULZ7Bn1xBEFN?p=info.\n","author":{"url":"https://github.com/templth","@type":"Person","name":"templth"},"datePublished":"2016-04-29T13:16:18Z","url":"https://github.com/angular/angular/issues/8333"}
| 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:b79ba2a4-4e96-8679-96c9-fa7ac961de0a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D9B0:16EED3:63B2F6:80B951:6B00E002 |
| html-safe-nonce | 7ded599772f3e0d3c676ebebf88f69276ae6670d8e6951cc09242c94f0a57aa1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUIwOjE2RUVEMzo2M0IyRjY6ODBCOTUxOjZCMDBFMDAyIiwidmlzaXRvcl9pZCI6IjcwNTk3NjUzODQwNjg1MjE5ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b6063c6d75a3495adb0a16334a114b306878c830d0079d2d0b14a23dd2ea2011 |
| hovercard-subject-tag | issue:151863083 |
| 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/8333/issue_layout |
| twitter:image | https://opengraph.githubassets.com/9a9edd28481abe679524a868e8d7f3f50c0da589e23367038f8044e38ab631fc/angular/angular/issues/8333 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/9a9edd28481abe679524a868e8d7f3f50c0da589e23367038f8044e38ab631fc/angular/angular/issues/8333 |
| og:image:alt | Steps to reproduce and a minimal demo of the problem It could be interesting to have the support of abstract components to be able to modularize shared configuration for components. For example a s... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | templth |
| 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