Menu Not Selected

Post Reply
peril
Posts: 1
Joined: 01 May 2021, 00:09

03 May 2021, 01:15

Hi,

When navigating to a route,the menu is not selected. IT works on the demo.
Any ideas why it contracts the menu after navigating to the component?

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

04 May 2021, 15:59

Hi,
Could you check your code includes the below part?

Code: Select all

    updateActiveStateFromRoute() {
        this.active = this.router.isActive(this.item.routerLink[0], !this.item.items);
    }
Also, you need constructor and menuService part because they provide correctly menu item select

Post Reply

Return to “Freya - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests