UNPKG

@progress/kendo-angular-listbox

Version:
41 lines (40 loc) 1.89 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, TemplateRef } from '@angular/core'; import * as i0 from "@angular/core"; /** * Renders the ListBox item content. To define the item template, nest an `<ng-template>` tag * with the `kendoListBoxItemTemplate` directive inside the `<kendo-listbox>` tag. The template context is * set to the current data item. * * @example * ```ts * _@Component({ * selector: 'my-app', * template: ` * <kendo-listbox [data]="listBoxItems"> * <ng-template kendoListBoxItemTemplate let-dataItem> * <span>{{ dataItem }} item</span> * </ng-template> * </kendo-listbox> * ` * }) * ``` */ export class ItemTemplateDirective { templateRef; constructor(templateRef) { this.templateRef = templateRef; } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemTemplateDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ItemTemplateDirective, isStandalone: true, selector: "[kendoListBoxItemTemplate]", ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ItemTemplateDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoListBoxItemTemplate]', standalone: true }] }], ctorParameters: function () { return [{ type: i0.TemplateRef }]; } });