Title: Load a component in a route depending on an asynchronous condition · Issue #12088 · angular/angular · GitHub
Open Graph Title: Load a component in a route depending on an asynchronous condition · Issue #12088 · angular/angular
X Title: Load a component in a route depending on an asynchronous condition · Issue #12088 · angular/angular
Description: I'm submitting a ... (check one with "x") bug report => search github for a similar issue or PR before submitting feature request support request => Please do not submit support request here, instead see https://github.com/angular/angula...
Open Graph Description: I'm submitting a ... (check one with "x") bug report => search github for a similar issue or PR before submitting feature request support request => Please do not submit support request here, inste...
X Description: I'm submitting a ... (check one with "x") bug report => search github for a similar issue or PR before submitting feature request support request => Please do not submit support...
Opengraph URL: https://github.com/angular/angular/issues/12088
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Load a component in a route depending on an asynchronous condition","articleBody":"**I'm submitting a ...** (check one with \"x\")\n- [ ] bug report => search github for a similar issue or PR before submitting\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**Current behavior**\nDoesn't seem possible to do it in an easy way without not use framework core stuff\n\n**Expected behavior**\nTo be able to determine by an asynchronous condition (a condition that will be resolved later) which component to load in a route.\n\n**What is the motivation / use case for changing the behavior?**\nI'd say the following is a very common behavior expected on any medium size app:\n\nLet's say you have a dashboard (just after you login). You wanna keep 2 different components UserDashboard and AdminDashboard (for not filling your template code with *ngIf), but that condition cannot be resolved immediately because the role comes from an API, so then you cannot \"right away\" conditionally pass one component or another to a specific route.\n\nThis doesn't seem to have an answer that implies not to compile and load a component by yourself.\nPlease, check out http://stackoverflow.com/questions/39688929/angular-2-how-to-conditionally-load-a-component-in-a-route-asynchronously \n- **Angular version:** 2.0.1","author":{"url":"https://github.com/alexjoverm","@type":"Person","name":"alexjoverm"},"datePublished":"2016-10-05T12:26:10Z","url":"https://github.com/angular/angular/issues/12088"}
| 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:2b25da67-5470-c34c-216c-87681be0d37f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AADC:28815B:9681EF:CAA217:6B00E82D |
| html-safe-nonce | 1decfb903f6399cf0f6f078d704e4c7afcf3084c2c94ff6b7d649840383340f1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQURDOjI4ODE1Qjo5NjgxRUY6Q0FBMjE3OjZCMDBFODJEIiwidmlzaXRvcl9pZCI6IjQzNzQ2NjUyODU0NDI1Mzk5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a58ca4a030d86e706c4dfb628dcb876074bfb9581b016e0d86964b23649021a8 |
| hovercard-subject-tag | issue:181138788 |
| 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/12088/issue_layout |
| twitter:image | https://opengraph.githubassets.com/627697d0b7b2f94e0470ad53d2b3e0f95af4bbe3ef14f728c505ed008b65cac0/angular/angular/issues/12088 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/627697d0b7b2f94e0470ad53d2b3e0f95af4bbe3ef14f728c505ed008b65cac0/angular/angular/issues/12088 |
| og:image:alt | I'm submitting a ... (check one with "x") bug report => search github for a similar issue or PR before submitting feature request support request => Please do not submit support request here, inste... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexjoverm |
| hostname | github.com |
| expected-hostname | github.com |
| None | 27088b6977484d0d3321d9a11c907c6d6637b315cfa359ef7952dbf6292f9b14 |
| 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 | 624179fb8b88d26ba5bba08894eb60a1c5a1d93d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width