diff --git a/src/app/layout/app.menu.component.ts b/src/app/layout/app.menu.component.ts
index 148b11a..3bf7a65 100644
--- a/src/app/layout/app.menu.component.ts
+++ b/src/app/layout/app.menu.component.ts
@@ -34,7 +34,7 @@ export class AppMenuComponent implements OnInit {
{ label: 'Panel', icon: 'pi pi-fw pi-tablet', routerLink: ['/uikit/panel'] },
{ label: 'Overlay', icon: 'pi pi-fw pi-clone', routerLink: ['/uikit/overlay'] },
{ label: 'Media', icon: 'pi pi-fw pi-image', routerLink: ['/uikit/media'] },
- { label: 'Menu', icon: 'pi pi-fw pi-bars', routerLink: ['/uikit/menu'], preventExact: true },
+ { label: 'Menu', icon: 'pi pi-fw pi-bars', routerLink: ['/uikit/menu'], routerLinkActiveOptions: { paths: 'subset', queryParams: 'ignored', matrixParams: 'ignored', fragment: 'ignored' } },
{ label: 'Message', icon: 'pi pi-fw pi-comment', routerLink: ['/uikit/message'] },
{ label: 'File', icon: 'pi pi-fw pi-file', routerLink: ['/uikit/file'] },
{ label: 'Chart', icon: 'pi pi-fw pi-chart-bar', routerLink: ['/uikit/charts'] },
diff --git a/src/app/layout/app.menuitem.component.ts b/src/app/layout/app.menuitem.component.ts
index 710dca3..ee34346 100644
--- a/src/app/layout/app.menuitem.component.ts
+++ b/src/app/layout/app.menuitem.component.ts
@@ -19,7 +19,7 @@ import { LayoutService } from './service/app.layout.service';
@@ -57,7 +57,7 @@ export class AppMenuitemComponent implements OnInit, OnDestroy {
@Input() parentKey!: string;
- @HostBinding('class.active-menuitem') active = false;
+ active = false;
menuSourceSubscription: Subscription;
@@ -131,6 +131,11 @@ export class AppMenuitemComponent implements OnInit, OnDestroy {
return this.root ? 'expanded' : (this.active ? 'expanded' : 'collapsed');
}
+ @HostBinding('class.active-menuitem')
+ get activeClass() {
+ return this.active && !this.root;
+ }
+
ngOnDestroy() {
if (this.menuSourceSubscription) {
this.menuSourceSubscription.unsubscribe();