Expand menu item corresponding to the active route

Post Reply
josephjht@gmail.com
Posts: 1
Joined: 21 Oct 2021, 14:06

21 Oct 2021, 17:18

Based on the active route, the corresponding menu item gets a blue text color for highlighting and the content section gets the intended page.
But the parent menu item containing the route page does not expand automatically.
Is there a way to achieve this?

The overlays page is displayed on the left. But the Components menu item is not expanded and hence does not show that the Overlays item under it is actually active.

merve7
Posts: 854
Joined: 12 Sep 2017, 10:44

25 Oct 2021, 12:26

Hi,
This situation related to active class (

Code: Select all

'[class.active-menuitem]': 'active'
) in app.menuitem.component.ts file and we update it according to route changes. You can change it according to your condition. Also, we will try your question.

Best regards,
Merve Özçifçi

Post Reply

Return to “Mirage - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests