Skip to content

Commit

Permalink
exact check for menu
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitfindikli committed Jan 26, 2022
1 parent 0f5d148 commit 017edc7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/app.menu.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,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']},
{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: 'File', icon: 'pi pi-fw pi-file', routerLink: ['/uikit/file']},
{label: 'Chart', icon: 'pi pi-fw pi-chart-bar', routerLink: ['/uikit/charts']},
Expand Down
2 changes: 1 addition & 1 deletion src/app/app.menuitem.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { AppMainComponent } from './app.main.component';
</a>
<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"
[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>
<span>{{item.label}}</span>
<span class="p-tag p-badge ml-auto" *ngIf="item.badge">{{item.badge}}</span>
Expand Down

0 comments on commit 017edc7

Please sign in to comment.