diff --git a/src/app/components/api/menuitem.ts b/src/app/components/api/menuitem.ts
index e577a050dca..cc1f17f50a4 100755
--- a/src/app/components/api/menuitem.ts
+++ b/src/app/components/api/menuitem.ts
@@ -1,6 +1,6 @@
import { QueryParamsHandling } from '@angular/router';
-import { TooltipOptions } from './tooltipoptions';
import { MegaMenuItem } from './megamenuitem';
+import { TooltipOptions } from './tooltipoptions';
/**
* MenuItem provides the following properties. Note that not all of them may be utilized by the tabmenu component.
@@ -143,6 +143,10 @@ export interface MenuItem {
* @see {TooltipOptions}
*/
tooltipOptions?: TooltipOptions;
+ /**
+ * Optional
+ */
+ [key: string]: any;
}
/**
diff --git a/src/app/components/breadcrumb/breadcrumb.ts b/src/app/components/breadcrumb/breadcrumb.ts
index 0d37f4d5746..d5c267b0345 100755
--- a/src/app/components/breadcrumb/breadcrumb.ts
+++ b/src/app/components/breadcrumb/breadcrumb.ts
@@ -87,10 +87,15 @@ import { BreadcrumbItemClickEvent } from './breadcrumb.interface';
[attr.tabindex]="item.disabled ? null : '0'"
[ariaCurrentWhenActive]="isCurrentUrl(item)"
>
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -171,6 +181,8 @@ export class Breadcrumb implements AfterContentInit {
separatorTemplate: TemplateRef | undefined;
+ itemTemplate: TemplateRef | undefined;
+
constructor(private router: Router) {}
onClick(event: MouseEvent, item: MenuItem) {
@@ -208,6 +220,12 @@ export class Breadcrumb implements AfterContentInit {
case 'separator':
this.separatorTemplate = item.template;
break;
+ case 'item':
+ this.itemTemplate = item.template;
+ break;
+ default:
+ this.itemTemplate = item.template;
+ break;
}
});
}
diff --git a/src/app/components/contextmenu/contextmenu.ts b/src/app/components/contextmenu/contextmenu.ts
index ad444896356..1d55827c471 100755
--- a/src/app/components/contextmenu/contextmenu.ts
+++ b/src/app/components/contextmenu/contextmenu.ts
@@ -11,14 +11,12 @@ import {
Inject,
Input,
NgModule,
- OnChanges,
OnDestroy,
OnInit,
Output,
PLATFORM_ID,
QueryList,
Renderer2,
- SimpleChanges,
TemplateRef,
ViewChild,
ViewContainerRef,
@@ -34,8 +32,8 @@ import { DomHandler } from 'primeng/dom';
import { AngleRightIcon } from 'primeng/icons/angleright';
import { RippleModule } from 'primeng/ripple';
import { TooltipModule } from 'primeng/tooltip';
-import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils';
import { Nullable, VoidListener } from 'primeng/ts-helpers';
+import { ObjectUtils, UniqueComponentId, ZIndexUtils } from 'primeng/utils';
@Component({
selector: 'p-contextMenuSub',
@@ -90,88 +88,94 @@ import { Nullable, VoidListener } from 'primeng/ts-helpers';
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
>
>;
+ itemTemplate: Nullable>;
+
container: HTMLDivElement | undefined;
outsideClickListener: VoidListener;
@@ -592,6 +601,12 @@ export class ContextMenu implements OnInit, AfterContentInit, OnDestroy {
case 'submenuicon':
this.submenuIconTemplate = item.template;
break;
+ case 'item':
+ this.itemTemplate = item.template;
+ break;
+ default:
+ this.itemTemplate = item.template;
+ break;
}
});
}
diff --git a/src/app/components/megamenu/megamenu.ts b/src/app/components/megamenu/megamenu.ts
index 58eab5bafa1..0978589245e 100755
--- a/src/app/components/megamenu/megamenu.ts
+++ b/src/app/components/megamenu/megamenu.ts
@@ -24,7 +24,7 @@ import {
signal
} from '@angular/core';
import { RouterModule } from '@angular/router';
-import { MegaMenuItem, MenuItem, PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';
+import { MegaMenuItem, PrimeNGConfig, PrimeTemplate, SharedModule } from 'primeng/api';
import { DomHandler } from 'primeng/dom';
import { AngleDownIcon } from 'primeng/icons/angledown';
import { AngleRightIcon } from 'primeng/icons/angleright';
@@ -82,83 +82,88 @@ import { ObjectUtils, UniqueComponentId } from 'primeng/utils';
[tooltipOptions]="getItemProp(processedItem, 'tooltipOptions')"
>