Title: Activation guard of child component affects creation/rendering of the parent component · Issue #18975 · angular/angular · GitHub
Open Graph Title: Activation guard of child component affects creation/rendering of the parent component · Issue #18975 · angular/angular
X Title: Activation guard of child component affects creation/rendering of the parent component · Issue #18975 · angular/angular
Description: I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here...
Open Graph Description: I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => P...
X Description: I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request ...
Opengraph URL: https://github.com/angular/angular/issues/18975
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Activation guard of child component affects creation/rendering of the parent component","articleBody":"\u003c!--\r\nPLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.\r\n\r\nISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.\r\n-->\r\n\r\n## I'm submitting a...\r\n\u003c!-- Check one of the following options with \"x\" -->\r\n\u003cpre>\u003ccode>\r\n[ ] Regression (a behavior that used to work and stopped working in a new release)\r\n[x] Bug report \u003c!-- Please search GitHub for a similar issue or PR before submitting -->\r\n[ ] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n\u003c/code>\u003c/pre>\r\n\r\n## Current behavior\r\nPreconditions: there is a nested routing tree (like /comp_a/comp_b/comp_c) with activation guards for each component. Activation guards of all components return \"true\" after some async operation/timeout.\r\n\r\n**UseCase 1.1**\r\nopen comp_a => waiting for CompA guard => render CompA\r\nopen comp_b => waiting for CompB guard => render CompB\r\nopen comp_c => waiting for CompC guard => render CompC\r\n\r\n**UseCase 1.2**\r\nopen /comp_a/comp_b/comp_c => waiting for CompA guard => waiting for CompB guard => waiting for CompC guard => render CompA + render CompB + render CompC\r\n\r\n\r\nPreconditions: there is a nested routing tree (like /comp_a/comp_b/comp_c) with activation guards for each component. Activation guards of all components except the last one return \"true\" after some async operation/timeout. Guard of the last component returns \"false\" after some async operation/timeout.\r\n\r\n**UseCase 2.1**\r\nopen comp_a => waiting for CompA guard => render CompA\r\nopen comp_b => waiting for CompB guard => render CompB\r\nopen comp_c => waiting for CompC guard => don't render CompC\r\n\r\n**UseCase 2.2**\r\nopen /comp_a/comp_b/comp_c => waiting for CompA guard => waiting for CompB guard => waiting for CompC guard => don't render components at all\r\n\r\n\r\n## Expected behavior\r\n\"UseCase 1.1\" and \"UseCase 2.1\" are ok\r\n\r\nFor \"UseCase 1.2\" expected:\r\nopen /comp_a/comp_b/comp_c => waiting for CompA guard => render CompA => waiting for CompB guard => render CompB => waiting for CompC guard => render CompC\r\n\r\nFor \"UseCase 2.2\" expceted:\r\nopen /comp_a/comp_b/comp_c => waiting for CompA guard => render CompA => waiting for CompB guard => render CompB => waiting for CompC guard => don't render CompC\r\n\r\n\r\n## Minimal reproduction of the problem with instructions\r\nhttps://plnkr.co/edit/xpkHSCSEzTK9yoAPJbvG?p=preview\r\nSTR:\r\n- click \"show components\"\r\n- there will be log where guards are resolved one-by-one\r\n- all components are appeared only after all guards are resolved\r\n\r\n\r\nThe issue is related to the https://github.com/angular/angular/commit/b9e32c8\r\nI totally agree that child CanActivate guard should wait for parent to comple, but parent components creation/rendering should not be affected by by child CanActivate guard (activation of the parent route snapshout should not wait until all child CanActivate guards are resolved successfully)\r\n\r\n\r\n## Environment\r\n\u003cpre>\u003ccode>\r\nAngular version: 4.3.3\r\n\u003c/code>\u003c/pre>","author":{"url":"https://github.com/andrui","@type":"Person","name":"andrui"},"datePublished":"2017-08-31T13:00:19Z","url":"https://github.com/angular/angular/issues/18975"}
| 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:348af992-116b-21f3-97cd-594ffee73145 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E8D4:95C88:B87E5F:F5CB04:6B00EFF6 |
| html-safe-nonce | c618a1f4997a47f645a0b92b88a199351820dc205599bfd96377addbcf8704b0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOEQ0Ojk1Qzg4OkI4N0U1RjpGNUNCMDQ6NkIwMEVGRjYiLCJ2aXNpdG9yX2lkIjoiNTgxMTQ5NDkwMTExNTg0MjU1MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 21bf5b4150faead804f118766f0e808e21b299ffeb2fcb7c7e6446f135f35dd9 |
| hovercard-subject-tag | issue:254326092 |
| 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/18975/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e5052bab8d4ea9ffab2235507e398641788cf40ace73fbb1ff1873513b02d7a7/angular/angular/issues/18975 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e5052bab8d4ea9ffab2235507e398641788cf40ace73fbb1ff1873513b02d7a7/angular/angular/issues/18975 |
| og:image:alt | I'm submitting a... [ ] Regression (a behavior that used to work and stopped working in a new release) [x] Bug report [ ] Feature request [ ] Documentation issue or request [ ] Support request => P... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | andrui |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width