Title: Unexpected RouteReuseStrategy behaviour · Issue #20018 · angular/angular · GitHub
Open Graph Title: Unexpected RouteReuseStrategy behaviour · Issue #20018 · angular/angular
X Title: Unexpected RouteReuseStrategy behaviour · Issue #20018 · angular/angular
Description: Hi I`m working with angular 4(angular-router@4.4.6); I have an instagram-like post grid and timeline, I want to to remember scroll point after getting back from a post etc,... I use the customRouteReuseStrategy shown below, but it gives ...
Open Graph Description: Hi I`m working with angular 4(angular-router@4.4.6); I have an instagram-like post grid and timeline, I want to to remember scroll point after getting back from a post etc,... I use the customRoute...
X Description: Hi I`m working with angular 4(angular-router@4.4.6); I have an instagram-like post grid and timeline, I want to to remember scroll point after getting back from a post etc,... I use the customRoute...
Opengraph URL: https://github.com/angular/angular/issues/20018
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unexpected RouteReuseStrategy behaviour","articleBody":"Hi\r\nI`m working with angular 4(angular-router@4.4.6);\r\nI have an instagram-like post grid and timeline, I want to to remember scroll point after getting back from a post etc,...\r\nI use the customRouteReuseStrategy shown below, but it gives an unpredictable behaviour\r\n\r\nCan anybody please give me a solution or alternative?\r\nThanks\r\n\r\n private handlers: { [key: string]: DetachedRouteHandle } = {};\r\n\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n shouldDetach(route: ActivatedRouteSnapshot): boolean {\r\n return true;\r\n }\r\n\r\n store(route: ActivatedRouteSnapshot, handle: DetachedRouteHandle): void {\r\n this.handlers[route.url.join(\"/\") || route.parent.url.join(\"/\")] = handle;\r\n }\r\n\r\n shouldAttach(route: ActivatedRouteSnapshot): boolean {\r\n return !!this.handlers[route.url.join(\"/\")];\r\n }\r\n\r\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle {\r\n return this.handlers[route.url.join(\"/\") || route.parent.url.join(\"/\")];\r\n }\r\n\r\n shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\r\n return future.routeConfig === curr.routeConfig;\r\n }\r\n\r\n\r\n\r\n ","author":{"url":"https://github.com/vahid-vahid","@type":"Person","name":"vahid-vahid"},"datePublished":"2017-10-30T14:48:58Z","url":"https://github.com/angular/angular/issues/20018"}
| 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:6d4cc7cc-e08f-b4ac-dedf-055badfa963f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C95E:1352CE:C0D5A:FEDD5:6B015E79 |
| html-safe-nonce | 71dd3ac0233da7a3ce2eb8d700bb647fd4725bf43c3deeaf96f4a925667a4d05 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTVFOjEzNTJDRTpDMEQ1QTpGRURENTo2QjAxNUU3OSIsInZpc2l0b3JfaWQiOiI0MDExOTA2OTU0MTY2MzYxNzIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1f6f60b87937c6c5c20cef0e83b1cace891a2a698a9987ea0a8825212518be52 |
| hovercard-subject-tag | issue:269627418 |
| 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/20018/issue_layout |
| twitter:image | https://opengraph.githubassets.com/20c5c8f4716819730c45528d1f3b8a5b834b13d3e85166ac7fbbff4531ede9ae/angular/angular/issues/20018 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/20c5c8f4716819730c45528d1f3b8a5b834b13d3e85166ac7fbbff4531ede9ae/angular/angular/issues/20018 |
| og:image:alt | Hi I`m working with angular 4(angular-router@4.4.6); I have an instagram-like post grid and timeline, I want to to remember scroll point after getting back from a post etc,... I use the customRoute... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | vahid-vahid |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width