routerLinkActive with [queryParams] is broken (worked in v2.0.2)
See original GitHub issueI’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior routerLinkActive of a child route with queryParams is not working when reloading the page with the params (it is working if you click the link). The ‘a’ element doesn’t receive the class provided to the routerLinkActive when the route match. This worked in version 2.0.2 and was broken between that version and version 2.2.1.
Expected behavior When the route match, the ‘a’ element will receive the class provided to routerLinkActive.
Minimal reproduction of the problem with instructions <a class=“item” [routerLink]=“[‘/insights’]” [queryParams]=“{id: myid}” routerLinkActive=“tab-active” [routerLinkActiveOptions]=“{exact: true}”> Link
the following route will not match the routerLinkActive http://localhost:4200/#/insights?id=aa
Please tell us about your environment: Tested in chrome only mac os sierra
- Angular version: 2.0.X I first spotted the issue in angular 2.2.1 (worked in older version - “2.0.2”). also broken on latest 2.2.3
Issue Analytics
- State:
- Created 7 years ago
- Reactions:5
- Comments:14 (8 by maintainers)
We will consider adding a
ignoreQueryParams
to the directive.any progress?