creativetimofficial / ct-material-dashboard-pro-angular

68 stars 35 forks source link

Problem with active route #207

Closed aceleghin closed 5 years ago

aceleghin commented 6 years ago

In my angular project I need to have these 2 routings:

 path: 'tickets'
 path: 'tickets/new'

Both paths have to be directly in the sidebar (not submenu or similar) like this:

{
  path: '/tickets',
  title: 'sidebar.titles.ticket',
  type: 'link',
  icontype: 'shopping_cart'
}

So at the moment when I select one of the routings, I see both selected in the sidebar, Is it possible to apply the active state at only 1 of the routings without changing path?

catt

aceleghin commented 6 years ago

Any news?

chelaruc commented 6 years ago

@lippomano Sorry for the late response. tickets/new it's a new component?

aceleghin commented 6 years ago

@chelaruc yes tickets and tickets/new are 2 different components. At the moment I used 2 completely different path tickets and buy...but if there is a way to solve this without changing my routes is better

chelaruc commented 6 years ago

@lippomano the component tickets/new is a child of tickets?

aceleghin commented 6 years ago

probably you can solve this using: [routerLinkActiveOptions]="{exact: true}"