Title: Using multiple components in different modules causing "Type X is part of the declarations of 2 modules" error · Issue #10646 · angular/angular · GitHub
Open Graph Title: Using multiple components in different modules causing "Type X is part of the declarations of 2 modules" error · Issue #10646 · angular/angular
X Title: Using multiple components in different modules causing "Type X is part of the declarations of 2 modules" error · Issue #10646 · 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...
Mail addresses
notifications@github.com
Opengraph URL: https://github.com/angular/angular/issues/10646
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Using multiple components in different modules causing \"Type X is part of the declarations of 2 modules\" error","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\nRight now you cannot import two directives of the same module \n\n**Expected/desired behavior**\n\nYou can use same directives/components in multiple modules without errors.\n\n**What is the motivation / use case for changing the behavior?**\n\nConcept of the shared module with its shared resources is good for components that are used everywhere. But if you have a complex application (ours contain more then 50 modules and 1500 components, services and pipes all together) multiple components can be reused different way. For example QuestionListPage uses UserActiveListPanel from User module. Also PhotoListPage uses same UserActiveListPanel, and VideoListPage uses UserActiveListPanel. How do I reuse this panel? Best way is see is to provide it in `directives` of the component as it was before rc.5. But right now I can't do it. But I can create lets say UserShareModule and put it there... its good, but if I put everything that is used by other modules from user module, i'll LOT of things there unnecessary in most of times. Then what to do? Create UserActiveListPanelShareModule? It will create lot of such trash files. So what to do? Maybe we simply can provide same directives multiple times without having this annoying error `Type X is part of the declarations of 2 modules`?\n\nIf you tell me that its by design, then my answer is: in my opinion its a bad design.\n\n**Please tell us about your environment:**\n- **Angular version:** 2.0.0-rc.5\n- **Browser:** [all ] \n- **Language:** [all] \n","author":{"url":"https://github.com/pleerock","@type":"Person","name":"pleerock"},"datePublished":"2016-08-10T17:19:33Z","url":"https://github.com/angular/angular/issues/10646"}
| 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:de90c155-c7f6-3812-2adf-5e1aa6a637b4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAB4:3E4205:CDA0B9:1141C6D:6B00FF9A |
| html-safe-nonce | 9826c4d8a825170d4fc04183c133372ea1b1c88c3f25a4ad7030c73b94d6e66d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUI0OjNFNDIwNTpDREEwQjk6MTE0MUM2RDo2QjAwRkY5QSIsInZpc2l0b3JfaWQiOiIyMjM0NzEyNDIxMjM3MzI1NzIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1e8e8f09bc1d83891e7efcfe453ef4abe162a9efe07a92119bcdd4841132d3ba |
| hovercard-subject-tag | issue:170471322 |
| 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/10646/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de27e4123a551580bf3db421765738db3b12d6098f633e2b7cfa55aae4ce868f/angular/angular/issues/10646 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de27e4123a551580bf3db421765738db3b12d6098f633e2b7cfa55aae4ce868f/angular/angular/issues/10646 |
| 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 | pleerock |
| 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