Skip to content

nsRouterLinkActive not working when nsRouterLink is on same element #2321

Closed

Description

Version: "@nativescript/angular": "~10.1.7",

When I put the nsRouterLink on the same element as the nsRouterLinkActive, the style class is not added.
When I put it on an element within, it works as expected.

<GridLayout [nsRouterLink]="/user/bob" nsRouterLinkActive="highlight" [nsRouterLinkActiveOptions]="{exact: true}"> <Label [text]="name" class="menu-text"></Label> </GridLayout>
does not work!

<GridLayout nsRouterLinkActive="highlight" [nsRouterLinkActiveOptions]="{exact: true}"> <Label [nsRouterLink]="/user/bob" [text]="name" class="menu-text"></Label> </GridLayout>
works! (and can be used as a workaround for now)

Maybe this has to do with change in angular?: angular/angular#10098

Best regards,
Yves.

Activity

  1. alexonozor commented on Aug 10, 2022

    @alexonozor

    I still experience this bug "@nativescript/angular": "^14.0.0",

  2. invergent commented on Aug 22, 2022

    @invergent

    I am experiencing this bug too. I am also using "@nativescript/angular": "^14.0.0".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions