Title: Router.navigate doesnt work with relative route unless that route is currently active · Issue #38276 · angular/angular · GitHub
Open Graph Title: Router.navigate doesnt work with relative route unless that route is currently active · Issue #38276 · angular/angular
X Title: Router.navigate doesnt work with relative route unless that route is currently active · Issue #38276 · angular/angular
Description: 🐞 bug report Affected Package The issue is caused by package @angular/router Is this a regression? Dont know Description When using Router.navigate and passing a relative route in NavigationExtras, navigation silently fails unless the re...
Open Graph Description: 🐞 bug report Affected Package The issue is caused by package @angular/router Is this a regression? Dont know Description When using Router.navigate and passing a relative route in NavigationExtras,...
X Description: 🐞 bug report Affected Package The issue is caused by package @angular/router Is this a regression? Dont know Description When using Router.navigate and passing a relative route in NavigationExtras,...
Opengraph URL: https://github.com/angular/angular/issues/38276
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Router.navigate doesnt work with relative route unless that route is currently active","articleBody":"\u003c!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅\r\n\r\nOh hi there! 😄\r\n\r\nTo expedite issue processing please search open and closed issues before submitting a new one.\r\nExisting issues often contain information about workarounds, resolution, or progress updates.\r\n\r\n🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->\r\n\r\n\r\n# 🐞 bug report\r\n\r\n### Affected Package\r\n\u003c!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->\r\n\u003c!-- ✍️edit: --> The issue is caused by package @angular/router\r\n\r\n\r\n### Is this a regression?\r\n\r\n\u003c!-- Did this behavior use to work in the previous version? -->\r\nDont know\r\n\r\n\r\n### Description\r\n\r\nWhen using Router.navigate and passing a relative route in NavigationExtras, navigation silently fails unless the relative route is CURRENTLY active. Documentation does not state that relativeTo route must currently be active (though the class type is called _ActivatedRoute_), that restriction would seem to be unwanted, and in any event a silent failure to navigate is certainly not expected behavior.\r\n\r\n## 🔬 Minimal Reproduction\r\nhttps://github.com/slubowsky/router-test\r\n\r\n1. Run app. \r\n2. Navigate to one by clicking the \"one\" button. This sets up a navigation function in NavigationService to perform navigation when called.\r\n3. Click \"Go to three using navigation service\" button. The navigation function is called and app successfully navigates as expected.\r\n4. Navigate to two by clicking the \"two\" button.\r\n5. Click \"Go to three using navigation service\" button. The same navigation function that previously successfully navigated is called again but this time app silently fails to navigate.\r\n\r\n## 🔥 Exception or Error\r\n\r\n\r\n## 🌍 Your Environment\r\n\r\n**Angular Version:**\r\n\u003cpre>\u003ccode>\r\nAngular CLI: 10.0.4\r\nNode: 14.6.0\r\nOS: win32 x64\r\n\r\nAngular: 10.0.5\r\n... animations, common, compiler, compiler-cli, core, forms\r\n... language-service, platform-browser, platform-browser-dynamic\r\n... router, service-worker\r\nIvy Workspace: Yes\r\n\r\nPackage Version\r\n-----------------------------------------------------------\r\n@angular-devkit/architect 0.1000.4\r\n@angular-devkit/build-angular 0.1000.4\r\n@angular-devkit/build-optimizer 0.1000.4\r\n@angular-devkit/build-webpack 0.1000.4\r\n@angular-devkit/core 7.3.10\r\n@angular-devkit/schematics 7.3.10\r\n@angular/cdk 10.1.1\r\n@angular/cli 10.0.4\r\n@ngtools/webpack 10.0.4\r\n@schematics/angular 8.3.28\r\n@schematics/update 0.1000.4\r\nrxjs 6.6.0\r\ntypescript 3.9.7\r\nwebpack 4.43.0\r\n\u003c/code>\u003c/pre>\r\n","author":{"url":"https://github.com/slubowsky","@type":"Person","name":"slubowsky"},"datePublished":"2020-07-28T21:00:40Z","url":"https://github.com/angular/angular/issues/38276"}
| 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:64673d34-42db-792b-6e28-ce5fc4c93b6e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CD6C:31B4CC:E6104F:12FD22A:6B00FD72 |
| html-safe-nonce | d1dd092ad335d39d1c1603b3e4fcbe5f32c22903ad32b5b7cbf3bf47e6a8838a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRDZDOjMxQjRDQzpFNjEwNEY6MTJGRDIyQTo2QjAwRkQ3MiIsInZpc2l0b3JfaWQiOiI3ODIxODk4OTg1NjIyMjczMzk0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 529fb038be9d9b8ba9f525b7709a73e3babef3e44eefefad71214043b04461db |
| hovercard-subject-tag | issue:667372722 |
| 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/38276/issue_layout |
| twitter:image | https://opengraph.githubassets.com/12e624b75e2b4980d1ad9224c3aeca6eec98380199656c27715cf625328240aa/angular/angular/issues/38276 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/12e624b75e2b4980d1ad9224c3aeca6eec98380199656c27715cf625328240aa/angular/angular/issues/38276 |
| og:image:alt | 🐞 bug report Affected Package The issue is caused by package @angular/router Is this a regression? Dont know Description When using Router.navigate and passing a relative route in NavigationExtras,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | slubowsky |
| hostname | github.com |
| expected-hostname | github.com |
| None | e208d86428ec00a57ade75058166297440e8128a01e5287c31a53dc042bbf187 |
| 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 | 7dafd017fb7809a839c443dba08622af38e63c09 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width