coreui / coreui-angular

CoreUI Components Library for Angular https://coreui.io/angular/docs/
https://coreui.io/angular/
MIT License
248 stars 146 forks source link

RouterLinkActiveOptions are not passed to navlink #107

Closed CloudStrife28492 closed 2 years ago

CloudStrife28492 commented 4 years ago

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 commented 4 years ago

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

joelmuskwe commented 2 years ago

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

xidedix commented 2 years ago

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