mirror of
https://github.com/akveo/ngx-admin.git
synced 2025-12-17 16:00:14 +01:00
feat(menu): 'hidden' menu attribute to hide the link from the menu but keep other related features in place (page title, breadcrumbs). Fix #151
(cherry picked from commit a3b7fa1)
This commit is contained in:
parent
7a82fce24f
commit
9178b6014b
2 changed files with 3 additions and 2 deletions
|
|
@ -34,7 +34,8 @@ All menu items are located inside the `src/app/app.routes.ts` file. Each route i
|
||||||
icon: 'ion-android-home', // menu icon
|
icon: 'ion-android-home', // menu icon
|
||||||
selected: false, // selected or not
|
selected: false, // selected or not
|
||||||
expanded: false, // expanded or not (if item has children)
|
expanded: false, // expanded or not (if item has children)
|
||||||
order: 0 // item order in the menu list
|
order: 0, // item order in the menu list,
|
||||||
|
hidden: true // hide menu item from a list but keep related features (breadcrums, page title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<li [ngClass]="{'al-sidebar-list-item': !child, 'ba-sidebar-sublist-item': child, 'selected': menuItem.selected && !menuItem.expanded, 'with-sub-menu': menuItem.children, 'ba-sidebar-item-expanded': menuItem.expanded}">
|
<li *ngIf="!menuItem.hidden" [ngClass]="{'al-sidebar-list-item': !child, 'ba-sidebar-sublist-item': child, 'selected': menuItem.selected && !menuItem.expanded, 'with-sub-menu': menuItem.children, 'ba-sidebar-item-expanded': menuItem.expanded}">
|
||||||
|
|
||||||
|
|
||||||
<a *ngIf="!menuItem.children" (mouseenter)="onHoverItem($event, item)" [href]="menuItem.url" [target]="menuItem.target" class="al-sidebar-list-link">
|
<a *ngIf="!menuItem.children" (mouseenter)="onHoverItem($event, item)" [href]="menuItem.url" [target]="menuItem.target" class="al-sidebar-list-link">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue