Title: RouterLinkActive initial render state prior to first router navigation · Issue #62973 · angular/angular · GitHub
Open Graph Title: RouterLinkActive initial render state prior to first router navigation · Issue #62973 · angular/angular
X Title: RouterLinkActive initial render state prior to first router navigation · Issue #62973 · angular/angular
Description: Which @angular/* package(s) are relevant/related to the feature request? router Description Hi team ! I wanted to open this issue to discuss your view regarding the current state of the directive RouterLinkActive and your plans regarding...
Open Graph Description: Which @angular/* package(s) are relevant/related to the feature request? router Description Hi team ! I wanted to open this issue to discuss your view regarding the current state of the directive R...
X Description: Which @angular/* package(s) are relevant/related to the feature request? router Description Hi team ! I wanted to open this issue to discuss your view regarding the current state of the directive R...
Opengraph URL: https://github.com/angular/angular/issues/62973
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RouterLinkActive initial render state prior to first router navigation","articleBody":"### Which @angular/* package(s) are relevant/related to the feature request?\n\nrouter\n\n### Description\n\nHi team !\n\nI wanted to open this issue to discuss your view regarding the current state of the directive `RouterLinkActive` and your plans regarding it.\n\nToday, this directive has a very neat api and we strongly recommend its usage in our company. \nHowever, the way it handles the display of the active class creates a visually annoying flicker... \nYou can see the flicker when you open for example https://material.angular.dev/components/categories and notice how the background around the Components button only appears after a short delay.\n\n(Note: angular.dev does not have this behavior but the active class was managed with completely home-made code ? also, angular.dev is missing `aria-current` attributes for the active anchors)\n\nFor more context, there are two problems.\n\nFirst one is the fact the class is added / removed through a queued microtrask. \nSecond is that at startup / hydration, a call to `router.isActive` will not be correct until the router has performed its first navigation internally...\n\n### Proposed solution\n\nIt depends greatly on what's the plan regarding Angular Routing in general...\nAs the team is working on turning many facets of old Angular into signals (Forms is another example), I guess Routing is in the works.\n\nI have opened the draft PR #62974 that removed the flicker for my internal project, but it probably has a bunch of issues...\n\n### Alternatives considered\n\nI guess copy-pasting the internal code done for angular.dev would work, but I would prefer to use something provided by `@angular/router`...","author":{"url":"https://github.com/quentinderoubaix","@type":"Person","name":"quentinderoubaix"},"datePublished":"2025-08-03T21:09:45Z","url":"https://github.com/angular/angular/issues/62973"}
| 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:ceff98a0-4a7f-8027-3ac3-d001cd2ae5eb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9722:11EACE:300F46F:4031EF1:6B01E2FA |
| html-safe-nonce | fbac466a81bf2db1d2351bbe0d0605340beb54b1bb3349202470551f5678724e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzIyOjExRUFDRTozMDBGNDZGOjQwMzFFRjE6NkIwMUUyRkEiLCJ2aXNpdG9yX2lkIjoiMzgyNzA1NTk4MTI2NzkwMzIyNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 7d2c1fa25d4b10cb2933c7da2b6d24a934611f84093da05356524a15c35616bb |
| hovercard-subject-tag | issue:3287541320 |
| 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/62973/issue_layout |
| twitter:image | https://opengraph.githubassets.com/87a62728cadb27f0366c6482bf1080cf59e75dbf0bccf664cef5b9906dce7c2c/angular/angular/issues/62973 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/87a62728cadb27f0366c6482bf1080cf59e75dbf0bccf664cef5b9906dce7c2c/angular/angular/issues/62973 |
| og:image:alt | Which @angular/* package(s) are relevant/related to the feature request? router Description Hi team ! I wanted to open this issue to discuss your view regarding the current state of the directive R... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | quentinderoubaix |
| 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