Title: location.back() does not work on cancelled route · Issue #14645 · angular/angular · GitHub
Open Graph Title: location.back() does not work on cancelled route · Issue #14645 · angular/angular
X Title: location.back() does not work on cancelled route · Issue #14645 · angular/angular
Description: **I'm submitting a ... [x] bug report [ ] feature request [ ] support request Current behavior I'm using a guard to protect a route (View Two). User can go from View One to View Two. Guard checks if application has some state. If not, th...
Open Graph Description: **I'm submitting a ... [x] bug report [ ] feature request [ ] support request Current behavior I'm using a guard to protect a route (View Two). User can go from View One to View Two. Guard checks i...
X Description: **I'm submitting a ... [x] bug report [ ] feature request [ ] support request Current behavior I'm using a guard to protect a route (View Two). User can go from View One to View Two. Guard ...
Opengraph URL: https://github.com/angular/angular/issues/14645
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"location.back() does not work on cancelled route","articleBody":"**I'm submitting a ...\n```\n[x] bug report\n[ ] feature request\n[ ] support request \n```\n\n**Current behavior**\nI'm using a guard to protect a route (**View Two**). User can go from **View One** to **View Two**. Guard checks if application has some state. If not, the guard redirect the user on a dedicated page (**View State**). On that page user will give the expected state to application. After that, I do a **location.back()**. This calls send back the user on page **View One** not on **View Two**.\n\n\n**Expected behavior**\nI will like that 'location.back()' back to the cancelled route (**View Two**)\n\n**Minimal reproduction of the problem with instructions**\n[A demonstration on plunkr](https://plnkr.co/edit/wxRFQlXNyClzLStcKtZQ?p=preview)\n\n**What is the motivation / use case for changing the behavior?**\nIn my application, there are optional pages (optional functionalities). Those pages can be accessed only if some configurations has been done before. When users try to navigate to those pages for the first time, I redirect them to the configuration pages. On those configuration pages, I want to use 'location.back()' to back to the cancelled routes.\n\n**Please tell us about your environment:**\n* **Environment:** Windows 7, Atom, npm, Webpack-dev-server\n\n* **Angular version:** 2.4.8\n* **Browser:** all\n* **Language:** TypeScript 2.1.5\n* **Node (for AoT issues):** `node --version` = 6.9.5","author":{"url":"https://github.com/michelherv","@type":"Person","name":"michelherv"},"datePublished":"2017-02-22T15:10:55Z","url":"https://github.com/angular/angular/issues/14645"}
| 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:1fdfbc77-409e-f99b-4b18-ce92ffa7cd81 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C384:DB09F:93AC39:BDDACB:6B00EFEC |
| html-safe-nonce | cee51b4f6430a07f2dd493d8db9ea089d4f41002c5ffe70d6204a60ea04d8772 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzg0OkRCMDlGOjkzQUMzOTpCRERBQ0I6NkIwMEVGRUMiLCJ2aXNpdG9yX2lkIjoiMTYwOTAxMTQxODM0NTU5NDY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 84758fde825dd99cfeec87480c1c672d9cc5bd59ac63d734c79f82dcf870857b |
| hovercard-subject-tag | issue:209482193 |
| 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/14645/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d70c62c51e9ad9439e24a37855d8b71c01818cdd938a28b8a04bee8448932616/angular/angular/issues/14645 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d70c62c51e9ad9439e24a37855d8b71c01818cdd938a28b8a04bee8448932616/angular/angular/issues/14645 |
| og:image:alt | **I'm submitting a ... [x] bug report [ ] feature request [ ] support request Current behavior I'm using a guard to protect a route (View Two). User can go from View One to View Two. Guard checks i... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | michelherv |
| 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