X Description: A common use case is to attach a class to an element if the router link inside that element is active. <nav> Menu <ul> <li> <!-- "router-link-active" class attached w...
Opengraph URL: https://github.com/angular/angular/issues/5877
X: @github
direct link
Domain: github.com
Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(router): Add directive for active route link","articleBody":"A common use case is to attach a class to an element if the router link inside that element is active.\n\n``` html\n\u003cnav>\n Menu\n \u003cul>\n \u003cli>\n \u003c!-- \"router-link-active\" class attached when route is active -->\n \u003ca [routerLink]=\"['Home']\" class=\"link\">Home\u003c/a>\n \u003c/li>\n \u003c/ul>\n\u003c/nav>\n```\n\nThere should be a built in directive to set a class on an element that isn't directly on the routerLink element\n\n``` html\n\u003cnav>\n Menu\n \u003cul>\n \u003c!-- \"active\" class attached when route is active -->\n \u003cli routerLinkActive=\"active\">\n \u003c!-- \"router-link-active\" class attached when route is active -->\n \u003ca [routerLink]=\"['Home']\" class=\"link\">Home\u003c/a> \n \u003c/li>\n \u003c/ul>\n\u003c/nav>\n```\n","author":{"url":"https://github.com/brandonroberts","@type":"Person","name":"brandonroberts"},"datePublished":"2015-12-14T14:26:28Z","url":"https://github.com/angular/angular/issues/5877"}
| 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:d40b9fa4-36ec-9ba0-ae9b-7ead38256c72 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB40:3F4253:174C125:1EFA02A:6B014351 |
| html-safe-nonce | 3b5c47509d4ed032172ee358b08772e53e05fab14fba83a7988c18c114092dbf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjQwOjNGNDI1MzoxNzRDMTI1OjFFRkEwMkE6NkIwMTQzNTEiLCJ2aXNpdG9yX2lkIjoiNjA3NzcwODUwOTM4MTQzNTY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b7534c2332f95c24a4fe6255bd71c64745a1496e15bc65ed10a7025b5dc5e063 |
| hovercard-subject-tag | issue:122052921 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///voltron/issues_fragments/issue_layout |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/5877/issue_layout |
| twitter:image | https://opengraph.githubassets.com/00abe4dfc6dc40f598af2563124fceb7d691cad76ed6685943ac4694b4cc9be6/angular/angular/issues/5877 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/00abe4dfc6dc40f598af2563124fceb7d691cad76ed6685943ac4694b4cc9be6/angular/angular/issues/5877 |
| og:image:alt | A common use case is to attach a class to an element if the router link inside that element is active. |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | brandonroberts |
| 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 |
| Skip to content | https://github.com/angular/angular/issues/5877#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F5877 |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fissues%2F5877 |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=angular%2Fangular |
| Reload | https://github.com/angular/angular/issues/5877 |
| Reload | https://github.com/angular/angular/issues/5877 |
| Reload | https://github.com/angular/angular/issues/5877 |
| angular | https://github.com/angular |
| angular | https://github.com/angular/angular |
| Code | https://github.com/angular/angular |
| Issues836 (836) | https://github.com/angular/angular/issues |
| Pull requests141 (141) | https://github.com/angular/angular/pulls |
| Discussions | https://github.com/angular/angular/discussions |
| Actions | https://github.com/angular/angular/actions |
| Projects | https://github.com/angular/angular/projects |
| Security and quality40 (40) | https://github.com/angular/angular/security |
| Insights | https://github.com/angular/angular/insights |
| https://github.com/angular/angular |
| New issue | https://github.com/login?return_to=https://github.com/angular/angular/issues/5877 |
| New issue | https://github.com/login?return_to=https://github.com/angular/angular/issues/5877 |
| feat(router): Add directive for active route link | https://github.com/angular/angular/issues/5877#top |
| https://github.com/brandonroberts |
| brandonroberts | https://github.com/brandonroberts |
| on Dec 14, 2015 | https://github.com/angular/angular/issues/5877#issue-122052921 |
| https://github.com/gionkunz |
| gionkunz | https://github.com/gionkunz |
| on Dec 14, 2015 | https://github.com/angular/angular/issues/5877#issuecomment-164457221 |
| #5870 | https://github.com/angular/angular/issues/5870 |
| https://github.com/brandonroberts |
| brandonroberts | https://github.com/brandonroberts |
| on Dec 14, 2015 | https://github.com/angular/angular/issues/5877#issuecomment-164458124 |
| @gionkunz | https://github.com/gionkunz |
| http://plnkr.co/edit/AFwfpxGqnN6bBBGK86sq?p=preview | http://plnkr.co/edit/AFwfpxGqnN6bBBGK86sq?p=preview |
| https://github.com/brandonroberts |
| brandonroberts | https://github.com/brandonroberts |
| on Jan 19, 2016 | https://github.com/angular/angular/issues/5877#issuecomment-172859093 |
| @gdi2290 | https://github.com/gdi2290 |
| #6407 | https://github.com/angular/angular/pull/6407 |
| brandonroberts | https://github.com/brandonroberts |
| completed | https://github.com/angular/angular/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted |
| on Jan 19, 2016 | https://github.com/angular/angular/issues/5877#event-519095475 |
| https://github.com/apps/angular-automatic-lock-bot |
| angular-automatic-lock-bot | https://github.com/apps/angular-automatic-lock-bot |
| on Sep 7, 2019 | https://github.com/angular/angular/issues/5877#issuecomment-529147698 |
| automatic conversation locking policy | https://github.com/angular/angular/blob/67d80f/docs/GITHUB_PROCESS.md#conversation-locking |
| angular-automatic-lock-bot | https://github.com/apps/angular-automatic-lock-bot |
| on Sep 7, 2019 | https://github.com/angular/angular/issues/5877#event-2616424064 |
| Sign up for free | https://github.com/signup?return_to=https://github.com/angular/angular/issues/5877 |
| Sign in to comment | https://github.com/login?return_to=https://github.com/angular/angular/issues/5877 |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |