Title: Dynamically load template for a component · Issue #15275 · angular/angular · GitHub
Open Graph Title: Dynamically load template for a component · Issue #15275 · angular/angular
X Title: Dynamically load template for a component · Issue #15275 · angular/angular
Description: I'm submitting a [X] feature request I have a component which provides some generic business logic. Let's say: CRUD functionality Productmanagement (product catalogue) Cross department business management (separate layout for each depart...
Open Graph Description: I'm submitting a [X] feature request I have a component which provides some generic business logic. Let's say: CRUD functionality Productmanagement (product catalogue) Cross department business man...
X Description: I'm submitting a [X] feature request I have a component which provides some generic business logic. Let's say: CRUD functionality Productmanagement (product catalogue) Cross department busi...
Opengraph URL: https://github.com/angular/angular/issues/15275
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dynamically load template for a component","articleBody":"I'm submitting a \r\n[X] feature request\r\n\r\nI have a component which provides some generic business logic. Let's say:\r\n- CRUD functionality \r\n- Productmanagement (product catalogue)\r\n- Cross department business management (separate layout for each department)\r\n- ...\r\n\r\nDepending on a condition I want to show a layout (template) which is specific for a type of product, related to the user department, etc.\r\nRight now I can't load a template on the fly for doing this. \r\nI have read through all the issues here and on stackoverflow for possible ways on doing this. \r\n\r\nThe most practicabel way is the ngTemplateLayout. But in real life if you have dozens of different layout types, it **blows up your template file and make unmaintenable.**\r\n\r\nIf you use the dynamiccomponentloader which is the most recommend way by the angular team, it adds an **huge overhead of code** for generating the component dynamically, even if the functionality for component and module creation is encapsulated. In addition **it doesn't allow a real generic solution**, because in the ngModule which has also be created dynamically you have to provide all imports, exports, providers, ... to make the component work. So if you don't want to have a huge overhead in your generic component builder, you have to implement a generic componentbuilder for each \"type\" of your form types. Which is not practicable and increases the danger of recoding all after the next angular release\r\n\r\n**Expected behavior**\r\n**Provide a way of loading a template dynamically for a component**. As it is available in Angular 1\r\nPlease don't be dogmatic on this issue and consider supporting real world requirements in Angular 2\r\nThanks","author":{"url":"https://github.com/KarlXOL","@type":"Person","name":"KarlXOL"},"datePublished":"2017-03-18T10:16:26Z","url":"https://github.com/angular/angular/issues/15275"}
| 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:cf64cce0-4825-fc26-504d-c824957f008d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D06E:1D20B7:32086D:3EFAE9:6B010353 |
| html-safe-nonce | 90c7e61b45e5e36040c2f54e9fb67d30c6c4d3c16c5dbec352a5950abfd8ee9d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDZFOjFEMjBCNzozMjA4NkQ6M0VGQUU5OjZCMDEwMzUzIiwidmlzaXRvcl9pZCI6IjIyMjg3NjA4MDc3NDU4NDgxNDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 76482100e3460da18305ffb9f017377c2e56eab130b23467dd07eb44bf680f1b |
| hovercard-subject-tag | issue:215182323 |
| 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/15275/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cb2037275db232422622e1c0e597a83107da3e35063620a783e2cf5a4a3f4c31/angular/angular/issues/15275 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cb2037275db232422622e1c0e597a83107da3e35063620a783e2cf5a4a3f4c31/angular/angular/issues/15275 |
| og:image:alt | I'm submitting a [X] feature request I have a component which provides some generic business logic. Let's say: CRUD functionality Productmanagement (product catalogue) Cross department business man... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | KarlXOL |
| 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