Title: APP_BASE_HREF doesn't work with routes which starts with the same text part · Issue #45744 · angular/angular · GitHub
Open Graph Title: APP_BASE_HREF doesn't work with routes which starts with the same text part · Issue #45744 · angular/angular
X Title: APP_BASE_HREF doesn't work with routes which starts with the same text part · Issue #45744 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description If route starts with the same part as APP_BASE_HREF, the route becomes broken. E.g.: app.module { provide: APP_BASE_HREF, useValue: '/ru' ...
Open Graph Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description If route starts with the same part as APP_BASE_HREF, the route becomes broken. E.g.: app.module { ...
X Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description If route starts with the same part as APP_BASE_HREF, the route becomes broken. E.g.: app.module { ...
Opengraph URL: https://github.com/angular/angular/issues/45744
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"APP_BASE_HREF doesn't work with routes which starts with the same text part","articleBody":"### Which @angular/* package(s) are the source of the bug?\r\n\r\nrouter\r\n\r\n### Is this a regression?\r\n\r\nNo\r\n\r\n### Description\r\n\r\nIf route starts with the same part as `APP_BASE_HREF`, the route becomes broken. E.g.:\r\n\r\napp.module\r\n```\r\n{\r\n provide: APP_BASE_HREF,\r\n useValue: '/ru'\r\n }\r\n```\r\n\r\napp-routing\r\n```\r\n{\r\n path: 'rules',\r\n loadChildren: () => import('./pages/text-pages/rules/rules.module').then(m => m.RulesModule)\r\n },\r\n```\r\n\r\nAnd if you try to navigate `example.com/rules` you will get `example.com/ru/les`\r\n\r\nPlease, take a look at the stackblitz reproduction below.\r\n\r\n### Please provide a link to a minimal reproduction of the bug\r\n\r\nhttps://stackblitz.com/edit/angular-ivy-68vpxc?file=src%2Fapp%2Fapp-routing.module.ts\r\n\r\n### Please provide the exception or error you saw\r\n\r\n```true\r\nERROR\r\nError: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'les'\r\nError: Cannot match any routes. URL Segment: 'les'\r\n```\r\n\r\n\r\n### Please provide the environment you discovered this bug in (run `ng version`)\r\n\r\n_No response_\r\n\r\n### Anything else?\r\n\r\n_No response_","author":{"url":"https://github.com/Dolgovec","@type":"Person","name":"Dolgovec"},"datePublished":"2022-04-24T12:51:45Z","url":"https://github.com/angular/angular/issues/45744"}
| 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:6da997a2-5f65-c3bb-df37-576461c9df37 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB42:25E63A:113B5E:17FBA9:6B04647B |
| html-safe-nonce | bdfc0fa115e1c7bafb0d58e8208427d92b4dc2528d7709fbdbcbc1bd5b31b001 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjQyOjI1RTYzQToxMTNCNUU6MTdGQkE5OjZCMDQ2NDdCIiwidmlzaXRvcl9pZCI6Ijg2NDIxMjU0NDI5NDM1NzUxNjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ca02a6dc0f637403c946deaf6e1ab3e94b0815b9b5c42fb5fea2e4dfa1f6dea3 |
| hovercard-subject-tag | issue:1213646570 |
| 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/45744/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b1ec653ae035efd086319f242803b48c4c35e87686dc648a18f52a39586c1ce/angular/angular/issues/45744 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b1ec653ae035efd086319f242803b48c4c35e87686dc648a18f52a39586c1ce/angular/angular/issues/45744 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description If route starts with the same part as APP_BASE_HREF, the route becomes broken. E.g.: app.module { ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Dolgovec |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2d58451b4bcb73c33c67bfb6b28fb75fe6d5e279daf9b560fa4fd832f3d8c9a6 |
| 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 | 03e114520787ad27289207f153520ef97461127c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width