exact check for menu

This commit is contained in:
yigitfindikli 2022-01-26 17:27:04 +03:00
parent 0f5d14802e
commit 017edc7a61
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ export class AppMenuComponent implements OnInit {
{label: 'Panel', icon: 'pi pi-fw pi-tablet', routerLink: ['/uikit/panel']}, {label: 'Panel', icon: 'pi pi-fw pi-tablet', routerLink: ['/uikit/panel']},
{label: 'Overlay', icon: 'pi pi-fw pi-clone', routerLink: ['/uikit/overlay']}, {label: 'Overlay', icon: 'pi pi-fw pi-clone', routerLink: ['/uikit/overlay']},
{label: 'Media', icon: 'pi pi-fw pi-image', routerLink: ['/uikit/media']}, {label: 'Media', icon: 'pi pi-fw pi-image', routerLink: ['/uikit/media']},
{label: 'Menu', icon: 'pi pi-fw pi-bars', routerLink: ['/uikit/menu']}, {label: 'Menu', icon: 'pi pi-fw pi-bars', routerLink: ['/uikit/menu'], preventExact: true},
{label: 'Message', icon: 'pi pi-fw pi-comment', routerLink: ['/uikit/message']}, {label: 'Message', icon: 'pi pi-fw pi-comment', routerLink: ['/uikit/message']},
{label: 'File', icon: 'pi pi-fw pi-file', routerLink: ['/uikit/file']}, {label: 'File', icon: 'pi pi-fw pi-file', routerLink: ['/uikit/file']},
{label: 'Chart', icon: 'pi pi-fw pi-chart-bar', routerLink: ['/uikit/charts']}, {label: 'Chart', icon: 'pi pi-fw pi-chart-bar', routerLink: ['/uikit/charts']},

View File

@ -22,7 +22,7 @@ import { AppMainComponent } from './app.main.component';
</a> </a>
<a (click)="itemClick($event)" *ngIf="(item.routerLink && !item.items) && item.visible !== false" [ngClass]="item.class" <a (click)="itemClick($event)" *ngIf="(item.routerLink && !item.items) && item.visible !== false" [ngClass]="item.class"
[routerLink]="item.routerLink" routerLinkActive="active-menuitem-routerlink router-link-exact-active" [routerLink]="item.routerLink" routerLinkActive="active-menuitem-routerlink router-link-exact-active"
[routerLinkActiveOptions]="{exact: true}" [attr.target]="item.target" [attr.tabindex]="0" [attr.aria-label]="item.label" role="menuitem" pRipple> [routerLinkActiveOptions]="{exact: !item.preventExact}" [attr.target]="item.target" [attr.tabindex]="0" [attr.aria-label]="item.label" role="menuitem" pRipple>
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i> <i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
<span>{{item.label}}</span> <span>{{item.label}}</span>
<span class="p-tag p-badge ml-auto" *ngIf="item.badge">{{item.badge}}</span> <span class="p-tag p-badge ml-auto" *ngIf="item.badge">{{item.badge}}</span>