Skip to content

routerLinkActive broken in ng-template Angular 8 #31930

@cbroxton

Description

@cbroxton

🐞 bug report

Affected Package

The issue is caused by package @angular/router

Is this a regression?

This was working in version 7.2

Description

When rendering a link with the routerLinkActive attribute inside an ng-template the routerLinkActive class is not applied to the parent element if the element is outside of the ng-template.

🔬 Minimal Reproduction

→ StackBlitz

🌍 Your Environment

Angular Version:

"@angular/compiler": "8.1.3",
"@angular/core": "8.1.3",
"@angular/common": "8.1.3",
"@angular/router": "8.1.3"

→ Link to package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions