@progress/kendo-angular-listview
Version:
Kendo UI Angular listview component
41 lines (40 loc) • 1.99 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* 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";
/**
* Allows customizing the list item content. To define an item template, nest an `<ng-template>` tag
* with the `kendoListViewItemTemplate` directive inside the `<kendo-listview>` tag
* ([see example]({% slug templates_listview %}#toc-item-template)).
*
* The following values are available as context variables:
* - `let-dataItem="dataItem"` (`any`)&mdashThe current data item. Also available as implicit context variable.
* - `let-index="index"` (`number`)&mdashThe current item index.
* - `let-isFirst="isFirst"` (`boolean`)&mdashIndicates whether the current data item renders as the first item on the list.
* - `let-isLast="isLast"` (`boolean`)&mdashIndicates whether the current data item renders as the last item on the list.
*
* @example
* ```typescript
* @Component({
* template: `
* <kendo-listview [data]="items">
* <ng-template kendoListViewItemTemplate let-dataItem let-index="index">
* <div class="item-wrapper">
* <h4>{{ dataItem.name }}</h4>
* <p>Item #{{ index + 1 }}: {{ dataItem.description }}</p>
* </div>
* </ng-template>
* </kendo-listview>
* `
* })
* export class AppComponent { }
* ```
*/
export declare class ItemTemplateDirective {
templateRef: TemplateRef<any>;
constructor(templateRef: TemplateRef<any>);
static ɵfac: i0.ɵɵFactoryDeclaration<ItemTemplateDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<ItemTemplateDirective, "[kendoListViewItemTemplate]", never, {}, {}, never, never, true, never>;
}