UNPKG

@progress/kendo-angular-menu

Version:

Kendo UI Angular Menu component

44 lines (43 loc) 1.8 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * Represents a template for the Menu items ([see example]({% slug templates_menu %})). To define a template * for an item, nest an `<ng-template>` tag with the `kendoMenuItemTemplate` directive inside a `<kendo-menu-item>` * component. To define a template for all Menu items, nest the template inside the `<kendo-menu>` component. * * The available fields in the template context are: * - `item`&mdash;The item data. * - `index`&mdash;The item index. * * @example * ```ts-preview * * _@Component({ * selector: 'my-app', * template: ` * <kendo-menu> * <kendo-menu-item text="item2"> * <ng-template kendoMenuItemTemplate let-item="item" let-index="index"> * <div style="padding: 10px;"> * My Template for: {{ item.text }} at index: {{ index }} * </div> * </ng-template> * </kendo-menu-item> * </kendo-menu> * ` * }) * * class AppComponent { * } * ``` */ export declare class ItemTemplateDirective { templateRef: TemplateRef<any>; constructor(templateRef: TemplateRef<any>); static ɵfac: i0.ɵɵFactoryDeclaration<ItemTemplateDirective, [{ optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDeclaration<ItemTemplateDirective, "[kendoMenuItemTemplate]", never, {}, {}, never, never, true, never>; }