Title: Async guards should have the option to wait for previous guards to finish · Issue #21702 · angular/angular · GitHub
Open Graph Title: Async guards should have the option to wait for previous guards to finish · Issue #21702 · angular/angular
X Title: Async guards should have the option to wait for previous guards to finish · Issue #21702 · angular/angular
Description: I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior When having multiple async guards(returning promise or observable) for the same path they execu...
Open Graph Description: I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior When having multiple async guards(returning promise or ...
X Description: I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior When having multiple async guards(returning promise...
Opengraph URL: https://github.com/angular/angular/issues/21702
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Async guards should have the option to wait for previous guards to finish","articleBody":"## I'm submitting a...\r\n\u003cpre>\u003ccode>\r\n[ ] Regression\r\n[ ] Bug report\r\n[X] Feature request\r\n[ ] Documentation issue or request\r\n[ ] Support request\r\n\u003c/code>\u003c/pre>\r\n\r\n## Current behavior\r\nWhen having multiple async guards(returning promise or observable) for the same path they execute at the same time:\r\n\r\n```\r\n{\r\n path: '',\r\n canActivate: [\r\n AuthGuard,\r\n DetectLanguage,\r\n GetAppdata,\r\n ],\r\n children: [ ... ]\r\n}\r\n```\r\n\r\n\r\n## Expected behavior\r\n\r\n- There should be an option to let them execute synchronous: guard[i+1] should wait for guard[i] to finish\r\n- If guard[i] returns false all following guards should not execute\r\n\r\n## What is the motivation / use case for changing the behavior?\r\nThe example above has an authentication which needs to be done first before getting the app data. Currently it will request the App-Data immediatly without having a token.\r\n\r\nThe only solution is to use some hacky way with only one guard that executes them in sync. The feature having an array of guards is useless then.\r\n\r\n\r\n## Environment\r\n\r\n\u003cpre>\u003ccode>Angular version: 5.2.x (i'm optimistic you implement this in 30minutes ;) )\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/MickL","@type":"Person","name":"MickL"},"datePublished":"2018-01-22T16:52:02Z","url":"https://github.com/angular/angular/issues/21702"}
| 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:aa0f1af3-7494-d149-c4e5-fabac53e63aa |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D118:311640:946FB3:BDFCE6:6B00EECD |
| html-safe-nonce | f71415b586d8f4364b668f815fff6ea187d1f13fa1bac745ab91584a1b651233 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTE4OjMxMTY0MDo5NDZGQjM6QkRGQ0U2OjZCMDBFRUNEIiwidmlzaXRvcl9pZCI6IjQ3MjQyOTQ1MDA3NDEwODI4MjkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ec0e06f68b464bc2b39ce351d7fa640c0ad51406690fc5abb499b4bdfe48a98c |
| hovercard-subject-tag | issue:290537224 |
| 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/21702/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5f9bdf48cda88a1dac3e359e63a3fefaf8af04f997fa7aa722cfe64c2bbb3c06/angular/angular/issues/21702 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5f9bdf48cda88a1dac3e359e63a3fefaf8af04f997fa7aa722cfe64c2bbb3c06/angular/angular/issues/21702 |
| og:image:alt | I'm submitting a... [ ] Regression [ ] Bug report [X] Feature request [ ] Documentation issue or request [ ] Support request Current behavior When having multiple async guards(returning promise or ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | MickL |
| 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