Skip to content

RouterLinkActiveOptions are not passed to navlink #107

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CloudStrife28492 opened this issue May 28, 2020 · 3 comments · Fixed by #113
Closed

RouterLinkActiveOptions are not passed to navlink #107

CloudStrife28492 opened this issue May 28, 2020 · 3 comments · Fixed by #113
Assignees

Comments

@CloudStrife28492
Copy link

CloudStrife28492 commented May 28, 2020

Hello there,

I'm using version 2.7.5 of coreui/angular and I try to set the routerLinkActiveOptions of my navigation items as follows:

{
  name: 'Vertragsregister',
  icon: 'fa fa-file',
  linkProps: {routerLinkActiveOptions: {exact: false}},
  url: '/vertragsregister'
},
{
  name: 'Vertrag anlegen',
  icon: 'fa fa-plus',
  linkProps: {routerLinkActiveOptions: {exact: false}},
  url: '/vertragsregister/neu'
 },

But the passed in routerLinkActiveOptions have no effect because they are never used inside nav link:

<a *ngSwitchDefault
     [ngClass]="item | appSidebarNavLink"
     [target]="item.attributes?.target"
     [queryParams]="item.linkProps?.queryParams"
     [fragment]="item.linkProps?.fragment"
     [queryParamsHandling]="item.linkProps?.queryParamsHandling"
     [preserveFragment]="item.linkProps?.preserveFragment"
     [skipLocationChange]="item.linkProps?.skipLocationChange"
     [replaceUrl]="item.linkProps?.replaceUrl"
     [state]="item.linkProps?.state"
     [routerLink]="item.url"
     [class.active]="linkActive"
     (click)="linkClicked()"
  >

When will this feature be supported? Or is there an alternative workaround?

@xidedix
Copy link
Member

xidedix commented Jul 15, 2020

@CloudStrife28492
Please update @coreui/angular to v2.9.4 and let us know if it works for you.

@joelmuskwe
Copy link
Contributor

RouterLinkActiveOptions are not passed to nav link and I am on @coreui/angular-pro version ^4.0.0-alpha.6

@xidedix xidedix reopened this Jun 8, 2022
@xidedix
Copy link
Member

xidedix commented Jun 10, 2022

@joelmuskwe thanks for the heads up - should work with 4.0.2

@xidedix xidedix closed this as completed Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants