Set Menu Item Active

Post Reply
Posts: 1
Joined: 16 Sep 2021, 17:48

16 Sep 2021, 17:53

I have a CRUD operation Page as example Manage Products in which on Create, I am not showing Create Product in Popup but showing in full page. But when I do that, I loose active menu from navigation. How do I programmatically set active menu for any page?


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

28 Sep 2021, 19:44

Maybe you can use 'updateActiveStateFromRoute(app.menuitem.component.ts) function for setting active class programmatically. Like;

Code: Select all = this.router.isActive(this.item.routerLink[0] || your_url(create page url), this.item.items ? false : true);
or you can change this class value

Code: Select all

        '[]': '(active && !root) || (active && appMain.isSlim())'
Best regards,
Merve Özçifçi

Post Reply

Return to “Ultima - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests