Title: Expose resolved route title · Issue #46825 · angular/angular · GitHub
Open Graph Title: Expose resolved route title · Issue #46825 · angular/angular
X Title: Expose resolved route title · Issue #46825 · angular/angular
Description: Which @angular/* package(s) are relevant/related to the feature request? router Description Since Angular 14, router has a new mechanism to update page title from route config. The route can either be a static string or resolved in the s...
Open Graph Description: Which @angular/* package(s) are relevant/related to the feature request? router Description Since Angular 14, router has a new mechanism to update page title from route config. The route can either...
X Description: Which @angular/* package(s) are relevant/related to the feature request? router Description Since Angular 14, router has a new mechanism to update page title from route config. The route can either...
Opengraph URL: https://github.com/angular/angular/issues/46825
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Expose resolved route title","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\n\nrouter\n\n### Description\n\nSince Angular 14, router has a new mechanism to update page title from route config. The route can either be a static string or resolved in the same way as `resolve` data.\r\n\r\nBut the resolved route title is not exposed and inaccessible from client application (it seems the title is actually stored in the resolved `Data`, but using a private `Symbol` so it can't be accessed properly).\n\n### Proposed solution\n\nExpose a new `title` property on `ActivatedRoute` and `ActivatedRouteSnapshot`, just like existing `params`, `data`...\n\n### Alternatives considered\n\nAlternative 1: Expose the internal `RouteTitle` symbol used to store title in `Data`, but this is probably not wanted because it would expose an implementation detail.\r\n\r\nAlternative 2: Use `TitleStrategy.buildTitle(snapshot: RouterStateSnapshot)` or, better, `TitleStrategy.getResolvedTitleForRoute(snapshot: ActivatedRouteSnapshot)`. But this has following drawbacks:\r\n- `TitleStrategy` must be injected where we need to (only) read the route title, which is not its primary purpose...\r\n- `TitleStrategy` is not very convenient to inject, because in default case, `DefaultTitleStrategy` is used but is not available through DI with `TitleStrategy` token. To get the actual strategy used, one must retrieve it from `Router.titleStrategy`.\r\n- This is inconsistent with existing public api of `ActivatedRoute`/`ActivatedRouteSnapshot`","author":{"url":"https://github.com/EmmanuelRoux","@type":"Person","name":"EmmanuelRoux"},"datePublished":"2022-07-13T17:09:21Z","url":"https://github.com/angular/angular/issues/46825"}
| 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:26c860b8-85de-3428-e013-3344012f8029 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D092:2D40DE:1FEFFB:2873EB:6B00FD84 |
| html-safe-nonce | 8ec163d97a25e2d4d2c1cc48494fe91bdd8b06c68230f2a45caf68bc703c0416 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMDkyOjJENDBERToxRkVGRkI6Mjg3M0VCOjZCMDBGRDg0IiwidmlzaXRvcl9pZCI6Ijg3MTc4ODExOTcwOTY2NjQ0NTIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 9651efcf50854b2b8c5d3598587893adbd71546dba9a48a83d8b389d0f7e682d |
| hovercard-subject-tag | issue:1303717752 |
| 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/46825/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da27e0614708a900ac67d5c7b3a0d19e0f0fa7623681ef0d42c3d7874cd9144b/angular/angular/issues/46825 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da27e0614708a900ac67d5c7b3a0d19e0f0fa7623681ef0d42c3d7874cd9144b/angular/angular/issues/46825 |
| og:image:alt | Which @angular/* package(s) are relevant/related to the feature request? router Description Since Angular 14, router has a new mechanism to update page title from route config. The route can either... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | EmmanuelRoux |
| 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