Skip to content
Snippets Groups Projects
Commit c510c4d1 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Merge branch 'links' into 'main'

Links

See merge request !111
parents 7e9d0166 f5aa6d9b
No related branches found
No related tags found
1 merge request!111Links
Pipeline #567901 passed with warnings
......@@ -24,9 +24,19 @@
@let show = navItem?.showInMenu ?? true;
@if (show) {
<button mat-menu-item [routerLink]="[navItem.routerLink]" (click)="onClick(navItem)">
{{ navItem.display }}
</button>
@if (navItem.isHref) {
<a mat-menu-item [href]="navItem.routerLink" (click)="onClick(navItem)">
{{ navItem.display }}
</a>
} @else {
<button
mat-menu-item
[routerLink]="[navItem.routerLink]"
(click)="onClick(navItem)"
>
{{ navItem.display }}
</button>
}
}
}
</mat-menu>
......@@ -36,9 +46,15 @@
@let show = navItem?.showInMenu ?? true;
@if (show) {
<button mat-menu-item [routerLink]="[navItem.routerLink]" (click)="onClick(navItem)">
{{ navItem.display }}
</button>
@if (navItem.isHref) {
<a mat-menu-item [href]="navItem.routerLink" (click)="onClick(navItem)">
{{ navItem.display }}
</a>
} @else {
<button mat-menu-item [routerLink]="[navItem.routerLink]" (click)="onClick(navItem)">
{{ navItem.display }}
</button>
}
}
}
}
......
......@@ -8,6 +8,9 @@ export interface Navigation {
/** Router link for navigation */
routerLink: string;
/** Is full url */
isHref?: boolean;
/**
* Whether to show in dashboard.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment