Title: routerLinkActive not activating if used on different tag than routerLink is used on · Issue #10704 · angular/angular · GitHub
Open Graph Title: routerLinkActive not activating if used on different tag than routerLink is used on · Issue #10704 · angular/angular
X Title: routerLinkActive not activating if used on different tag than routerLink is used on · Issue #10704 · angular/angular
Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question Current be...
Open Graph Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/ma...
X Description: I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angula...
Opengraph URL: https://github.com/angular/angular/issues/10704
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"routerLinkActive not activating if used on different tag than routerLink is used on","articleBody":"**I'm submitting a ...** (check one with \"x\")\n\n```\n[x] bug report\n[ ] feature request\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\n```\n\n**Current behavior**\nrouterLinkActive is not activating (so `.active` is not being added to element) if used on different tag than routerLink is used on when navigating with the same parent component. For example: \n\nThis works:\n\n``` html\n\u003cul>\n \u003cli>\n \u003ca routerLinkActive=\"active\" [routerLink]=\"['assessments']\">Page One\u003c/a>\n \u003c/li>\n \u003cli>\n \u003ca routerLinkActive=\"active\" [routerLink]=\"['case-plans']\">Page Two\u003c/a>\n \u003c/li>\n \u003c/ul>\n```\n\nBut this doesn't:\n\n``` html\n\u003cul>\n \u003cli routerLinkActive=\"active\">\n \u003ca [routerLink]=\"['assessments']\">Page One\u003c/a>\n \u003c/li>\n \u003cli routerLinkActive=\"active\">\n \u003ca [routerLink]=\"['case-plans']\">Page Two\u003c/a>\n \u003c/li>\n \u003c/ul>\n```\n\n**Expected/desired behavior**\nI would expect routerLinkActive to work on `\u003cli>` tags since frameworks like Bootstrap style the `\u003cli>` tag when it's active, etc.\n\n**Reproduction of the problem**\nhttps://plnkr.co/edit/upLeYcMNctfGtvKrBeVo?p=preview\n\n**What is the motivation / use case for changing the behavior?**\nCue the user that they are on the screen they want to be on.\n\n**Please tell us about your environment:**\n- **Angular version:** 2.0.0-rc.5, and @angular/router 3.0.0-rc.1\n- **Browser:** OSX El Capital, Chrome 52\n- **Language:** [Typescript] \n","author":{"url":"https://github.com/sharpmachine","@type":"Person","name":"sharpmachine"},"datePublished":"2016-08-11T20:35:51Z","url":"https://github.com/angular/angular/issues/10704"}
| 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:af7ee6bd-94a2-be79-7829-1ac347450087 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DECE:FC5BE:12A8273:18CC7DE:6B0122E5 |
| html-safe-nonce | 955453104fa68f8e29f6b27b8d14014f80a1e603b2be4d196f4297d8b97d181c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUNFOkZDNUJFOjEyQTgyNzM6MThDQzdERTo2QjAxMjJFNSIsInZpc2l0b3JfaWQiOiI3OTc1MzUwMTYxMjg5MzIzMjM3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d9cd560a57ae2974142ad932ffa9f5932cf7eb6203dcda99ea96f84e0a043b60 |
| hovercard-subject-tag | issue:170739808 |
| 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/10704/issue_layout |
| twitter:image | https://opengraph.githubassets.com/88bdcd9f3b09e535618c02cc512af40cd9e9cce02c350699b87a1daebf92ac70/angular/angular/issues/10704 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/88bdcd9f3b09e535618c02cc512af40cd9e9cce02c350699b87a1daebf92ac70/angular/angular/issues/10704 |
| og:image:alt | I'm submitting a ... (check one with "x") [x] bug report [ ] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/ma... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sharpmachine |
| 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