Title: Dynamic Routing with AOT · Issue #5754 · angular/angular-cli · GitHub
Open Graph Title: Dynamic Routing with AOT · Issue #5754 · angular/angular-cli
X Title: Dynamic Routing with AOT · Issue #5754 · angular/angular-cli
Description: I'm working on a app where i need to have a logic in routing to decide which page should be the home page, it works fine with JIT but with AOT. Here is how my code looks like let subdomain = environment.production ? window.location.host....
Open Graph Description: I'm working on a app where i need to have a logic in routing to decide which page should be the home page, it works fine with JIT but with AOT. Here is how my code looks like let subdomain = enviro...
X Description: I'm working on a app where i need to have a logic in routing to decide which page should be the home page, it works fine with JIT but with AOT. Here is how my code looks like let subdomain = en...
Opengraph URL: https://github.com/angular/angular-cli/issues/5754
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dynamic Routing with AOT","articleBody":"I'm working on a app where i need to have a logic in routing to decide which page should be the home page, it works fine with JIT but with AOT. Here is how my code looks like\r\n\r\n let subdomain = environment.production ? window.location.host.replace('www.', '').split('.')[0] : 'sahiwal';\r\n let districts = {sahiwal:'121', faisalabad:'122'}\r\n export const routes: Routes = [\r\n {\r\n path: '',\r\n component: MasterComponent,\r\n children: [\r\n {\r\n path: districts[subdomain] ? '' : 'home',\r\n loadChildren: './home.module#HomeModule',\r\n data: {title: 'سجاگ'}\r\n }, {\r\n path: subdomain === domain ? '' : 'main',\r\n loadChildren: './main.page.module#MainPageModule',\r\n data: {title: 'سجاگ'}\r\n },\r\n {\r\n path: 'news',\r\n loadChildren: './news.module#NewsModule',\r\n data: {title: 'خبر سجاگ'}\r\n }, {\r\n path: subdomain === 'features' ? '' : 'features',\r\n loadChildren: './archive.module#ArchiveModule',\r\n data: {title: 'خبر سجاگ'}\r\n }\r\n }\r\n ];\r\n\r\n\r\n\r\n### Versions\r\n@angular/cli: 1.0.0\r\nnode: 6.9.1\r\nos: darwin x64\r\n@angular/common: 4.0.1\r\n@angular/compiler: 4.0.1\r\n@angular/animations: 4.0.1\r\n@angular/core: 4.0.1\r\n@angular/forms: 4.0.1\r\n@angular/http: 4.0.1\r\n@angular/platform-browser: 4.0.1\r\n@angular/platform-browser-dynamic: 4.0.1\r\n@angular/platform-server: 4.0.1\r\n@angular/router: 4.0.1\r\n@angular/cli: 1.0.0\r\n@angular/compiler-cli: 4.0.1\r\n\r\n\r\n","author":{"url":"https://github.com/sam-rusty","@type":"Person","name":"sam-rusty"},"datePublished":"2017-03-30T10:30:43Z","url":"https://github.com/angular/angular-cli/issues/5754"}
| 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:305d4d3f-0c8b-e019-019a-87b4b3a0bfe8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5B0:29AEE8:B8D549:F7BB3D:6B00F4C7 |
| html-safe-nonce | ae3a3848c4f8e52be09946e93ffe833dae1f7d08a6f6ed939e15ced941394746 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUIwOjI5QUVFODpCOEQ1NDk6RjdCQjNEOjZCMDBGNEM3IiwidmlzaXRvcl9pZCI6IjQwNjI2MTI1NDM0OTM5NjA5MDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | daacb79f37f5600f5c24cc0948cc1a7ae8c70cc26e27b1450c5c54752c1b0144 |
| hovercard-subject-tag | issue:218152016 |
| 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-cli/5754/issue_layout |
| twitter:image | https://opengraph.githubassets.com/844e6e865c1adb53a7bae5121dfae5c1dc39748a0ab08102a68ce9798b2637eb/angular/angular-cli/issues/5754 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/844e6e865c1adb53a7bae5121dfae5c1dc39748a0ab08102a68ce9798b2637eb/angular/angular-cli/issues/5754 |
| og:image:alt | I'm working on a app where i need to have a logic in routing to decide which page should be the home page, it works fine with JIT but with AOT. Here is how my code looks like let subdomain = enviro... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sam-rusty |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular-cli git https://github.com/angular/angular-cli.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 36891867 |
| octolytics-dimension-repository_nwo | angular/angular-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 36891867 |
| octolytics-dimension-repository_network_root_nwo | angular/angular-cli |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width